[CentOS] Setting up postfix under CentOS-6

Thu Sep 12 22:41:43 UTC 2013
Ned Slider <ned at unixmail.co.uk>

On 12/09/13 23:04, Timothy Murphy wrote:
> Carl T. Miller wrote:
>
>> I'd be surprised if anything in that document is not
>> right.  If you find anything or you need assistance,
>> the list is here.
>
> I didn't find anything wrong in the document in question
> (http://wiki.centos.org/HowTos/postfix),
> except that a couple of packages mentioned
> (ystem-change-mail*) don't seem to exist in CentOS-6.
>

That was for switching the default MTA in EL5. As Postfix is already the 
default in EL6 it is simply not needed.

> However, if my experience is anything to go by,
> it missed out two essential points.
>
> Firstly, after following the instructions meticulously,
> I found that I could not send out mail
> because (according to /var/log/maillog)
> the From address was tim at localhost.localdomain ,
> and this was rejected by the recipient host
> or rather his ISP.
> -------------------------------
> <tim at localhost.localdomain>  MAIL FROM domain does not exist
>    (in reply to MAIL FROM command)
> -------------------------------
> I cured this by adding
>    tim tim at gayleard.eu
> to /etc/hosts .
> I don't know if this is the best way to go about it?
>

This is typically caused by having your hostname set to localhost (or 
loaclhost.localdomain). Your hostname should reflect your fqdn.

> After correcting this, I found my email was still rejected,
> with the message "Blacklisted by Spamhaus"!
> I read in <http://www.spamhaus.org/pbl/query/PBL814205>
> that 'the reason is simply that you need to turn on "SMTP Authentication"'
>

The bit at the top of the Spamhaus link says it all really - as a matter 
of *policy*, Spamhaus and/or your ISP has decided that you shouldn't be 
sending email direct from that IP address as it's residential / dynamic 
/ whatever. Either way, as a result 90% of the internet is going to 
reject your mail. You will need to relay all outbound email through your 
ISPs smarthost to achieve any sort of deliverability.