Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I used this tutorial for forwarding email to another email address on a test mail server and Gmail but it did not work.

http://www.cyberciti.biz/faq/linux-unix-bsd-postfix-forward-email-to-another-account/

How can I find out what's the problem?

  1. How can I figure it out if my mail was received on main server?
  2. How can I find out what is my forwarding method problem?

Postfix log:

Sep  9 12:18:17 server postfix/sendmail[10080]: fatal: bad string length 0 < 1: setgid_group = 
Sep  9 12:19:23 server postfix/master[12006]: fatal: bind 0.0.0.0 port 25: Address already in use
Sep  9 12:28:24 server postfix/master[25885]: fatal: bind 0.0.0.0 port 25: Address already in use
Sep  9 12:30:40 server postfix/postfix-script[28876]: fatal: the Postfix mail system is not running
Sep  9 12:30:42 server postfix/postfix-script[28955]: fatal: the Postfix mail system is not running
Sep  9 12:31:13 server postfix/master[29748]: fatal: bind 0.0.0.0 port 25: Address already in use
Sep  9 12:31:14 server postfix/master[29936]: fatal: bind 0.0.0.0 port 25: Address already in use
Sep  9 12:32:03 server postfix/master[31197]: fatal: bind 0.0.0.0 port 25: Address already in use
Sep  9 12:34:01 server postfix/postdrop[2200]: warning: unable to look up public/pickup: No such file or directory
Sep  9 12:34:57 server postfix/master[3820]: fatal: bind 0.0.0.0 port 25: Address already in use
Sep  9 12:35:01 server postfix/postdrop[3967]: warning: unable to look up public/pickup: No such file or directory
Sep  9 12:35:07 server postfix/master[4205]: fatal: bind 0.0.0.0 port 25: Address already in use
Sep  9 12:38:02 server postfix/postdrop[7888]: warning: unable to look up public/pickup: No such file or directory
Sep  9 12:39:02 server postfix/postdrop[9301]: warning: unable to look up public/pickup: No such file or directory
Sep  9 12:49:01 server postfix/postdrop[22743]: warning: unable to look up public/pickup: No such file or directory
Sep  9 12:56:01 server postfix/postdrop[1193]: warning: unable to look up public/pickup: No such file or directory
Sep  9 12:57:01 server postfix/postdrop[2747]: warning: unable to look up public/pickup: No such file or directory
Sep  9 12:58:01 server postfix/postdrop[4245]: warning: unable to look up public/pickup: No such file or directory
Sep  9 13:26:01 server postfix/postdrop[11767]: warning: unable to look up public/pickup: No such file or directory
Sep  9 13:37:01 server postfix/postdrop[27388]: warning: unable to look up public/pickup: No such file or directory
Sep  9 13:38:01 server postfix/postdrop[28812]: warning: unable to look up public/pickup: No such file or directory
Sep  9 13:39:01 server postfix/postdrop[30206]: warning: unable to look up public/pickup: No such file or directory
Sep  9 13:52:01 server postfix/postdrop[15271]: warning: unable to look up public/pickup: No such file or directory
Sep  9 13:53:01 server postfix/postdrop[16820]: warning: unable to look up public/pickup: No such file or directory
Sep  9 14:04:02 server postfix/postdrop[32421]: warning: unable to look up public/pickup: No such file or directory
Sep  9 14:05:02 server postfix/postdrop[1492]: warning: unable to look up public/pickup: No such file or directory
Sep  9 14:08:01 server postfix/postdrop[5150]: warning: unable to look up public/pickup: No such file or directory
Sep  9 14:09:01 server postfix/postdrop[6297]: warning: unable to look up public/pickup: No such file or directory
Sep  9 14:10:01 server postfix/postdrop[7659]: warning: unable to look up public/pickup: No such file or directory

Netstat for listening ports:

root@server:~# netstat -lnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      18906/popa3d    
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      8554/nginx      
tcp        0      0 183.23.14.12:53         0.0.0.0:*               LISTEN      26997/named     
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      26997/named     
tcp        0      0 0.0.0.0:8342            0.0.0.0:*               LISTEN      2577/sshd       
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      31700/sendmail: MTA
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      26997/named     
tcp        0      0 127.0.0.1:587           0.0.0.0:*               LISTEN      31700/sendmail: MTA
tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      2269/memcached  
tcp6       0      0 :::80                   :::*                    LISTEN      8554/nginx      
tcp6       0      0 :::53                   :::*                    LISTEN      26997/named     
tcp6       0      0 :::8342                 :::*                    LISTEN      2577/sshd       
tcp6       0      0 ::1:953                 :::*                    LISTEN      26997/named     
tcp6       0      0 :::3306                 :::*                    LISTEN      2500/mysqld     
udp        0      0 127.0.0.1:11211         0.0.0.0:*                           2269/memcached  
udp        0      0 183.23.14.12:53         0.0.0.0:*                           26997/named     
udp        0      0 127.0.0.1:53            0.0.0.0:*                           26997/named     
udp        0      0 183.23.14.12:123        0.0.0.0:*                           2202/ntpd       
udp        0      0 127.0.0.1:123           0.0.0.0:*                           2202/ntpd       
udp        0      0 0.0.0.0:123             0.0.0.0:*                           2202/ntpd       
udp6       0      0 :::53                   :::*                                26997/named     
udp6       0      0 ee82::5247:5dfe:fa7:321 :::*                                2202/ntpd       
udp6       0      0 ::1:123                 :::*                                2202/ntpd       
udp6       0      0 :::123                  :::*                                2202/ntpd       
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   PID/Program name    Path
unix  2      [ ACC ]     STREAM     LISTENING     9995     2214/dbus-daemon    /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     5401     2502/php-fpm.conf)  /var/run/php5-fpm.sock
unix  2      [ ACC ]     STREAM     LISTENING     161280317 31700/sendmail: MTA /var/run/sendmail/mta/smcontrol
unix  2      [ ACC ]     STREAM     LISTENING     10078    2500/mysqld         /var/run/mysqld/mysqld.sock
unix  2      [ ACC ]     SEQPACKET  LISTENING     9587     404/udevd           /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     6527     2270/acpid          /var/run/acpid.socket

after solve port 25 conflict and clear log file:

root@server:~# cat /var/log/mail.log
Sep 10 00:44:19 server postfix/master[12480]: terminating on signal 15
Sep 10 00:44:19 server postfix/master[15838]: daemon started -- version 2.9.6, configuration /etc/postfix
share|improve this question
1  
Could you post relevant sections from your postfix logs? –  Andrew Domaszek Sep 9 '13 at 8:11
    
@AndrewDomaszek i add postfix logs –  sweb Sep 9 '13 at 9:42
    
I petitioned to move this to unix.se. –  Andrew Domaszek Sep 9 '13 at 19:32
    
@AndrewDomaszek as you wish, but my problem not solved yet. –  sweb Sep 9 '13 at 20:18
    
Log doesn't show any connect attempts. Make sure you are using the right mail server. –  Andrew Domaszek Sep 10 '13 at 0:20

1 Answer 1

Seems like you have 2 SMTPDs running. Use netstat -lnp as root and look for whatever is listening on port 25 (local address column). Then turn that program off and try starting postfix again.

Update, I see the netstat now. If you look in the middle there, you see a line that says 127.0.0.1:25. This means sendmail is listening for local delivery. You should stop the sendmail service and disable it.

service sendmail stop
chkconfig sendmail off
share|improve this answer
    
i add netstat -lnp. check this out. –  sweb Sep 9 '13 at 18:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.