Setting a “smarthost” in Postfix September 7, 2005
Posted by Carthik in administration, ubuntu.trackback
Since Postfix is the default Mailer used in Ubuntu, and since you may need to set a smarthost to possibly send outgoing mail through the SMTP server on a webserver, or your ISP, here’s how to do that:
Edit /etc/postfix/main.cf, and add or edit this line:
relayhost = your.server.com
Followed by restarting the postfix service:
$sudo /etc/init.d/postfix restart
This might be handy particularly for those who use a combination of Mutt + procmail + fetchmail to read their mail – old style.







Very handy – just what I was looking for.
[...] You can choose to submit stats via http, or via email. Both are automated processes, and I’d choose http for the convenience. If, however, you do choose email, note that you might have to take a small additional step to enable postfix to send the email properly. You can follow the instructions to setup a “smarthost” in postfix to ensure that your email gets sent and received without problems. I have my popcon set up to use the http protocol to send information. Since it is anonymous, it is not a threat to your privacy. So go ahead, and give ‘em some feedback. [...]
[...] Tiek piedāvāta iespēja vai nu sūtīt informāciju izvēloties HTTP protokolu vai arī sūtīt pa epastu. Lai varētu sūtīt informāciju pa epastu, nepieciešams uzskaņot postfix (apraksts). [...]
Just found this post, good info.
But how do you set postfix up to be a smarthost when the external SMTP server requires authentication and TLS? i.e in my case I’m using Google’s external SMTP server. Thanks.
Great Post,
I could not send any emails to my ISP accounts. My ISP ‘refused to talk, 554′. I edited the main.cf file as you suggested and all is working fine. I can now send and recieve mail in and out of my network with postfix. Thanks.
Marston: There’s some format for this. Something like:
user:pass@smtp.yourmailserver.com
That’s not right, but it’s something like that.
[...] the DET smtp server. I put than in at etc/postfix;/main.cf Here is the very basic what to do… “Setting a Smarthost in Postfix” BTW – using the sudo /etc/init.d/postfix [...]
This doesn’t work. I have an older smarthost configuration working with sendmail. I’m attempting to upgrade to a newer Ubuntu system using Postfix. This “trick” doesn’t work for a couple of reason. For one, Postfix complains that myhostname and relayhost cannot be the same. So I changed relayhost to be exactly the text in this post “your.server.com”. Of course that didn’t work.
I think there is some confusion over what a relay is, and what a smarthost is. This may be why Postfix does not seem to be able to do smarthost’ing.
Thoughts? Please respond. I very much want to get this working and if I’m wrong I really want to know.
http: www dot michael-prokop.at/postfix/ This worked for me
the provided information is in fact _not_ very helpful. the above configuration will only work with an open relay. in other words: the premium invitation to all the spammers in the wide, wide world.
please, with the above slogan “Not quite everything about Ubuntu, but close”, just try to avoid articles like this one an try to act a little more _sensible_
This is a a useful bit of info. I was having problems sending emails to my ISP accounts too but once I edited the “.cf” file it now works great. Thanks for the tip.
Yes I had the same problem too, thanks for the advice.
But how do you set postfix up to be a smarthost when the external SMTP server requires authentication and TLS?
#default_transport = error
#relay_transport = error
if you have the above lines in the main.cf
make sure you comment them if you want to send email.
Didn’t work for my ISP using either the fqdn (mail.ispname.net) as it complained about an mx record lookup issue. So I replaced it with just “ispname.net” (so it could find the mx record itself) and I was back to the previous errors I had.
*** Finally, when I replaced the domain name with the IP ADDRESS of the ISP’s mail server it finally accepted my mails.
It had previously complained of “poor reputation of the MTA” or words to that effect.
[...] Setting a “smarthost” in Postfix « Ubuntu Blog (tags: ubuntu mail) [...]
Thanks! It worked fine for me with JeOS ubuntu 8.04 and internal SMTP relay.
Instead of relying on this post to configure your postfix Email server, you could better by reading documentation on http://www.postfix.org
[...] your own mail server, then setting it up to use your ISP as a smarthost is the easy way to go (very easy with Ubuntu), of course I didn’t take that [...]
Hi, Does this work on the latest version Ubuntu?
thenk you man, bknz : pet izmir
But how do you set postfix up to be a smarthost when the external SMTP server requires authentication and TLS? i.e in my case I’m using Google’s external SMTP server. Thanks.
İYİ
süper payşım teşekkürler
antalya ev ilaçlama
iyi
teşekur ederım
Hey there, You have done a great job. I will certainly digg it and individually suggest to my friends. I am sure they will be benefited from this web site.
[...] up a smarthost in postfix (presuming you are still using postfix on ubuntu) http://embraceubuntu.com/2005/09/07/…st-in-postfix/ which would usually be a relay provided by your ISP, ask them about it, or search around. Then once [...]
Thanks! It worked fine for me with JeOS ubuntu 8.04 and internal SMTP relay.
Thanks for that! I hate it, when im trying something for hours with no result…
Yes that is true. Can remeber, that i tried that some month ago and quitted it then.
Very helpful article. Thanks you took the time to write it down!
Great Job, this is a really good article.
Nice Site, i will sure come back to visit ur blog again!
Guys, how about writing some good new articles?
They are busy!
This helps a lot, i wish you would write some more tutorials!
This was very helpfull, THANKS!
Nice article. Your posts are very good for beginners!
Really good work. It runs perfect!
Nice work man! That helps a lot!!!
Good work, was very helpfull!
Though it’s a very good pice of work, it didn’t help me..
That doesnt work for me *cry*
For me neither. Damn it!
I dont understand, why so much of you having problems with this.
maybe try solving the problems on your own
Thank you very much for this helpfull script!
Thank you for this nice blogposting!
A very nice blog I really like to read
Thanks for this blog dude!
Feuchte Youporn Pornos warten hier auf deinen Besuch, schau sie dir gleich an!
Ich ruf gerne mal auf geilen Telefon Hotlines an, wenn ich es hart besorgt brauche.
Thanks for this blog dude!
A very nice blog
safdsadfsdf
sssssadfa super geile seite
coole sexvideos von youporn gibts hier
Nackte Webcamschlampen erwarten dich hier auf unserer scharfen Sexcam Telefonsex Hotline. Da gehts echt ab!
A very nice blog
Super seite viel erfolg…
A very nice blog
Tabulose Sexcam und Sexchat Girls erwarten dich bereits splitternackt in unserem scharfen Livechat. Dort kannst du dir sicher sein, dass du gleich sofort losficken kannst und keine wertvolle Zeit vergeudet wird. Also wenn du mal wieder Bock auf ein paar dreckige Sexcam und Sexchat Girls hast, dann komm gleich vorbei im Fickchat!
Telefonsex mit richtig gielen tabulosen Schlampen bekommst du nur hier auf unserer einzigartigen Sextube. Dort warten wirklich einzigartige scharfe Weiber nur darauf mit dir intim zu werden. Komm also gleich mal vorbei und probier es mal aus. Du wirst sehen, dass Telefonsex nicht gleich Telefonsex ist…
Die geilsten Sex Porno Filme warten bereits auf deinen harten Schwanz. Wenn du mal wieder Lust hast auf richtig scharfe Weiber, die dir wirklich alles zeigen wollen, dann solltest du gleich mal bei uns vorbeikommen und einen Bilck auf die kostenlosen Sex Porno Filme werfen.
Wie einfach es ist eine tolle Seite zu finden die noch dazu richtig viel Spaß macht. Einfach mal vorbeikommen und die geilen Mobilen Handy Pornos ansehen!