[Solved] Postfix is not sending any email

4 posts / 0 new
Last post
#1 Mon, 11/05/2012 - 08:04
IFR70

[Solved] Postfix is not sending any email

Hi, I've migrated my Webmin, Virtualmin and all my website from an Ubuntu 10.04 64 bit VPS server to a CentOS 6.3 64bit VPS server, using this procedure:

https://www.virtualmin.com/documentation/system/migrate

After that, all works well, but the Postfix server is not sending any email.

Looking into the maillog LOG file I can see:

Nov 5 16:27:27 fabio postfix/qmgr[24320]: C37A3F1B0A10: from=senderemail@senderdomain.it, size=1282, nrcpt=1 (queue active) Nov 5 16:27:27 fabio postfix/smtp[25942]: fatal: unknown service: smtp/tcp Nov 5 16:27:28 fabio postfix/qmgr[24320]: warning: private/smtp socket: malformed response Nov 5 16:27:28 fabio postfix/qmgr[24320]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description Nov 5 16:27:28 fabio postfix/master[24318]: warning: process /usr/libexec/postfix/smtp pid 25942 exit status 1 Nov 5 16:27:28 fabio postfix/master[24318]: warning: /usr/libexec/postfix/smtp: bad command startup -- throttling Nov 5 16:27:28 fabio postfix/error[25944]: C37A3F1B0A10: to=senderemail@senderdomain.it, orig_to=destemail@destdomain.it, relay=none, delay=420, delays=419/1/0/0.02, dsn=4.3.0, status=deferred (unknown mail transport error)

Probably the Ubuntu Postfix configuration is not compatible with CentOS configuration, but I'm not so expert to understand where...

I searched days for a solution, without success.

Any suggestion?

Thank you in advance.

PS. the new server is on the same SolusVM storage, so I don't think could be a provider problem.

Mon, 11/05/2012 - 09:22
andreychek

Howdy,

It should be no problem to migrate Virtualmin domains from Ubuntu to CentOS.

However, it sounds like you're seeing a Postfix configuration issue -- which isn't something that would be changed using the migration instructions you mentioned.

Did you by chance copy in the main.cf or master.cf files from your old system?

If so, it's possible that could be the issue.

Is there any chance that you could paste in the output of these two commands:

postconf -n
grep '^[^#]' /etc/postfix/master.cf
Mon, 11/05/2012 - 10:36 (Reply to #2)
IFR70

Hi, thank you very much for the answer.

In the meantime I tried copying the file

/etc/services

to

/var/spool/postfix/etc/services

and now the error message is different... it means that probably I solved the previous issue, but now I get this one:

Nov 5 19:04:52 fabio postfix/smtp[9738]: 36291F1B0B02: to=destemail@libero.it, orig_to=senderemail@senderdomain.it, relay=none, delay=4704, delays=4704/0.01/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=libero.it type=MX: Host not found, try again).

Looks like Postfix is not able to resolve the destination domain name, although libero.it is a valid domain name (I tried with my working email, of course).

If I DIG the domain, I get the correct result:

[root@fabio log]# dig libero.it

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.5 <<>> libero.it ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37299 ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION: ;libero.it. IN A

;; ANSWER SECTION: libero.it. 2881 IN A 151.1.67.215 libero.it. 2881 IN A 151.1.67.216 libero.it. 2881 IN A 151.1.67.218 libero.it. 2881 IN A 151.1.67.221 libero.it. 2881 IN A 151.1.67.227

;; Query time: 14 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Mon Nov 5 19:10:34 2012 ;; MSG SIZE rcvd: 107

So it means that the server is able to resolve the domain...

the output of the command postconf -n is:

alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases allow_percent_hack = no append_dot_mydomain = no biff = no broken_sasl_auth_clients = yes config_directory = /etc/postfix home_mailbox = Maildir/ mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME mailbox_size_limit = 0 mydestination = fabio.myserver.info, localhost.myserver.info, localhost myhostname = fabio.myserver.info mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname readme_directory = no recipient_delimiter = + sender_bcc_maps = hash:/etc/postfix/bcc smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_banner = $myhostname ESMTP $mail_name (CentOS) smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes virtual_alias_maps = hash:/etc/postfix/virtual

and the output of the command grep '^[^#]' /etc/postfix/master.cf is:

smtp inet n - - - - smtpd -o smtpd_sasl_auth_enable=yes pickup fifo n - - 60 1 pickup cleanup unix n - - - 0 cleanup qmgr fifo n - n 300 1 qmgr tlsmgr unix - - - 1000? 1 tlsmgr rewrite unix - - - - - trivial-rewrite bounce unix - - - - 0 bounce defer unix - - - - 0 bounce trace unix - - - - 0 bounce verify unix - - - - 1 verify flush unix n - - 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - - - - smtp relay unix - - - - - smtp -o smtp_fallback_relay= showq unix n - - - - showq error unix - - - - - error retry unix - - - - - error discard unix - - - - - discard local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - - - - lmtp anvil unix - - - - 1 anvil scache unix - - - - 1 scache maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) ifmail unix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - n n - - pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient scalemail-backend unix - n n - 2 pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension} mailman unix - n n - - pipe flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user} submission inet n - - - - smtpd -o smtpd_sasl_auth_enable=yes

Thank you in advance.

Mon, 11/05/2012 - 12:32
IFR70

Got it!!!

The file /var/spool/postfix/etc/resolv.conf was missing... i copied it from /etc/resolv.conf and now is working well.

Topic locked