[CentOS] Setting up postfix under CentOS-6

Timothy Murphy gayleard at eircom.net
Fri Sep 13 13:59:05 UTC 2013


natxo asenjo wrote:

>>>> 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?
> 
> That is a very odd hosts file entry :-).

Sorry, that was a curious typo from my notes.
It should have read:

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)
-------------------------------

> So in order to find out what postfix thinks $myhostname is in its
> default settings, try this:
> 
> # postconf -d | grep myhostname

I'm afraid I can't at the moment,
as I have lost connection to the remote server (in Italy),
probably due to a power outage, fairly common there at this time of year.

But I was asked in /etc/postfix/main.cf for $myhostname,
and set it to my fqdn.
What is the point of asking for this if it is not used?

I'm sure it is also set in /etc/hosts ,
but as I said I can't check that at the moment.

> If you set a fqdn in myhostname, then you will not have that problem.

If you mean myhostname in /etc/postfix/main.cf
then as I just said it is set to the fqdn.
Also I should point out that sendmail has been working perfectly there,
without any such messages in /var/log/maillog .

> Trying to run an MTA on a
> dial-up host is an exercise in futility. You may agree of disagree
> whether this is fair, but it is a fact.

It may be a fact, but it is a totally irrelevant one in this context,
since I am not "running an MTA on a dial-up host".
I have a perfectly standard broadband connection
(admittedly a little flaky in Italy).

> If you want to have a test postfix server with an acceptable IP address,
> get yourself a vm on any cloud provider. Then you will not be blocked
> unless you start spamming :-) . Those vm's are very affordable (from
> 5$/month on).

This suggestion, like others along the same lines,
seems more or less crazy to me.
Why on earth should I want to get a VM on a cloud provider?
I have perfectly good internal and external IP addresses
(the latter thanks to dyndns).

As I have said, I have postfix/amavis working perfectly now.
But it was much more time-consuming than it should have been,
due in my opinion to very bad documentation,
or possibly lack of documentation for someone setting up a home network.


-- 
Timothy Murphy  
e-mail: gayleard /at/ eircom.net
School of Mathematics, Trinity College, Dublin 2, Ireland





More information about the CentOS mailing list