17 posts / 0 new
Last post
#1 Thu, 12/19/2013 - 23:44
jlgonqui

postfix

I really hope this is the correct forum if not I send my apologize before hand. Im using Ubuntu 12.04.3 LTS with Vitualmin 4.04 gpl. A fresh instalation using the automatization tool from the website.

Everytime that I open the system window the postfix mail server item shows a cross that the sevice is down, but when I activated it runs ok but when I click refresh system information again shows the cross. I have not been able to send email at all

Fri, 12/20/2013 - 04:59
Locutus

In a fresh Virtualmin installation on Ubuntu 12, Postfix should work okay out of the box. Maybe you're experiencing a memory issue or similar. Is this a VPS or a physical host? If VPS, is it a Virtuozzo system? How much memory do you have?

What output do you get for this in a shell: (please enclose screen listings in [code][/code] tags)

service postfix restart
netstat -tpln | grep :25
ps aux | grep postfix
Fri, 12/20/2013 - 08:48
andreychek

Howdy,

In addition to Locutus's excellent thoughts, you may also want to take a look in your mail logs, in /var/log/mail.log, to see if there's any errors or other helpful information in there.

Also, if you're using an OpenVZ or Virtuozzo VPS, can you paste in the contents of your /proc/user_beancounters file?

Thanks!

-Eric

Mon, 12/23/2013 - 16:49
jlgonqui
I did the installation again and start with a clean ubuntu copy and virtualmin gpl and started right away. The error that started with went off but now I can received, but I can not send out and this is the mail log
 
Dec 21 12:34:46 sipeicenet dovecot: imap-login: Login: user=<adminsipeicenet>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=3483, secured
Dec 21 12:34:46 sipeicenet dovecot: imap-login: Login: user=<adminsipeicenet>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=3484, secured
Dec 21 12:34:47 sipeicenet dovecot: imap(adminsipeicenet): Connection closed bytes=615/8713
Dec 21 12:34:47 sipeicenet dovecot: imap(adminsipeicenet): Connection closed bytes=250/2187
Dec 21 12:35:03 sipeicenet dovecot: imap-login: Login: user=<adminsipeicenet>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=3545, secured
Dec 21 12:35:03 sipeicenet dovecot: imap(adminsipeicenet): Connection closed bytes=57/802
Dec 21 12:35:03 sipeicenet dovecot: imap-login: Login: user=<adminsipeicenet>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=3547, secured
Dec 21 12:35:03 sipeicenet dovecot: imap(adminsipeicenet): Connection closed bytes=57/802
Dec 21 12:35:47 sipeicenet dovecot: imap-login: Login: user=<adminsipeicenet>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=3556, secured
Dec 21 12:35:48 sipeicenet postfix/smtpd[3564]: connect from sipeicenet.iownyour.org[127.0.0.1]
Dec 21 12:35:48 sipeicenet postfix/trivial-rewrite[3567]: warning: do not list domain sipeicenet.iownyour.org in BOTH mydestination and virtual_alias_domains
Dec 21 12:35:48 sipeicenet postfix/smtpd[3564]: 7729FD0090A: client=sipeicenet.iownyour.org[127.0.0.1]
Dec 21 12:35:48 sipeicenet postfix/cleanup[3568]: 7729FD0090A: message-id=<1387647347.3554@sipeicenet.iownyour.org>
Dec 21 12:35:48 sipeicenet postfix/qmgr[2119]: 7729FD0090A: from=<adminsipeicenet@sipeicenet.iownyour.org>, size=772, nrcpt=1 (queue active)
Dec 21 12:35:48 sipeicenet postfix/smtpd[3564]: disconnect from sipeicenet.iownyour.org[127.0.0.1]
Dec 21 12:35:48 sipeicenet dovecot: imap(adminsipeicenet): Connection closed bytes=840/2189
Dec 21 12:35:55 sipeicenet dovecot: imap-login: Login: user=<adminsipeicenet>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=3573, secured
Dec 21 12:35:55 sipeicenet dovecot: imap(adminsipeicenet): Connection closed bytes=615/8713
Sat, 12/21/2013 - 13:50
Locutus

As I wrote, please enclose shell listings in [code][/code] tags to preserve monospace font and line breaks. Otherwise your text is unreadable.

Mon, 12/23/2013 - 16:50
jlgonqui
(No info could be read for "-p": geteuid()=1000 but you should be root.)
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN                                                                                                 -
tcp6       0      0 :::25                   :::*                    LISTEN                                                                                                 -
jorge@sipeicesrv:~$ netstat -tpln | grep :26
(No info could be read for "-p": geteuid()=1000 but you should be root.)
jorge@sipeicesrv:~$ netstat -tpln | grep :25
(No info could be read for "-p": geteuid()=1000 but you should be root.)
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN                                                                                                 -
tcp6       0      0 :::25                   :::*                    LISTEN                                                                                                 -
jorge@sipeicesrv:~$ ps aux | grep postfix
root      2097  0.0  0.0   4580  1472 ?        Ss   14:48   0:00 /usr/lib/postfi                                                                                           x/master
postfix   2113  0.0  0.0   4600  1424 ?        S    14:48   0:00 pickup -l -t fi                                                                                           fo -u -c
postfix   2114  0.0  0.0   4648  1344 ?        S    14:48   0:00 qmgr -l -t fifo                                                                                            -u
root      2132  0.0  0.0  12068   836 ?        Ss   14:48   0:00 /usr/sbin/sasla                                                                                           uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2133  0.0  0.0  12068   520 ?        S    14:48   0:00 /usr/sbin/sasla                                                                                           uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2134  0.0  0.0  12068   520 ?        S    14:48   0:00 /usr/sbin/sasla                                                                                           uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2135  0.0  0.0  12068   520 ?        S    14:48   0:00 /usr/sbin/sasla                                                                                           uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2136  0.0  0.0  12068   520 ?        S    14:48   0:00 /usr/sbin/sasla                                                                                           uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
postfix   2151  0.0  0.1   7196  2620 ?        S    14:48   0:00 tlsmgr -l -t un                                                                                           ix -u -c
postfix   3559  0.0  0.0   4600  1328 ?        S    15:11   0:00 anvil -l -t uni                                                                                           x -u -c
postfix   3711  0.0  0.1   7136  2072 ?        S    15:13   0:00 smtp -t unix -u                                                                                            -c
postfix   3739  0.0  0.0   4628  1360 ?        S    15:13   0:00 bounce -z -n de                                                                                           fer -t unix -u -c
jorge     4205  0.0  0.0   4388   832 pts/0    R+   15:16   0:00 grep --color=au                                                                                           to postfix
Sun, 12/22/2013 - 14:32
jlgonqui

sorry Im trying to paste it in the correct format I will try again

Sun, 12/22/2013 - 14:54
jlgonqui
 * Stopping Postfix Mail Transport Agent postfix                                                                     sed: can't read /var/spool/postfix/pid/master.pid: Permission denied
jorge@sipeicesrv:~$ netstat -tpln | grep :25
(No info could be read for "-p": geteuid()=1000 but you should be root.)
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN                                           -
tcp6       0      0 :::25                   :::*                    LISTEN                                           -
jorge@sipeicesrv:~$ netstat -tpln | grep :26
(No info could be read for "-p": geteuid()=1000 but you should be root.)
jorge@sipeicesrv:~$ netstat -tpln | grep :25
(No info could be read for "-p": geteuid()=1000 but you should be root.)
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN                                           -
tcp6       0      0 :::25                   :::*                    LISTEN                                           -
jorge@sipeicesrv:~$ ps aux | grep postfix
root      2097  0.0  0.0   4580  1472 ?        Ss   14:48   0:00 /usr/lib/postfi                                     x/master
postfix   2113  0.0  0.0   4600  1424 ?        S    14:48   0:00 pickup -l -t fi                                     fo -u -c
postfix   2114  0.0  0.0   4648  1344 ?        S    14:48   0:00 qmgr -l -t fifo                                      -u
root      2132  0.0  0.0  12068   836 ?        Ss   14:48   0:00 /usr/sbin/sasla                                     uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2133  0.0  0.0  12068   520 ?        S    14:48   0:00 /usr/sbin/sasla                                     uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2134  0.0  0.0  12068   520 ?        S    14:48   0:00 /usr/sbin/sasla                                     uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2135  0.0  0.0  12068   520 ?        S    14:48   0:00 /usr/sbin/sasla                                     uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2136  0.0  0.0  12068   520 ?        S    14:48   0:00 /usr/sbin/sasla                                     uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
postfix   2151  0.0  0.1   7196  2620 ?        S    14:48   0:00 tlsmgr -l -t un                                     ix -u -c
postfix   3559  0.0  0.0   4600  1328 ?        S    15:11   0:00 anvil -l -t uni                                     x -u -c
postfix   3711  0.0  0.1   7136  2072 ?        S    15:13   0:00 smtp -t unix -u                                      -c
postfix   3739  0.0  0.0   4628  1360 ?        S    15:13   0:00 bounce -z -n de                                     fer -t unix -u -c
jorge     4205  0.0  0.0   4388   832 pts/0    R+   15:16   0:00 grep --color=au                                     to postfix
jorge@sipeicesrv:~$ (No info could be read for "-p": geteuid()=1000 but you should be root.)
-bash: syntax error near unexpected token `('
jorge@sipeicesrv:~$ tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN    </span>
Sun, 12/22/2013 - 15:40
Locutus

Seems you're not performing these commands as root. You might want to retry them as root. Also, please fix your second post with the mail.log and add the code tags.

Mon, 12/23/2013 - 10:16
jlgonqui

this is with root

root@sipeicesrv:/home/jorge# ps aux | grep postfix
root      2132  0.0  0.0  12068   836 ?        Ss   Dec22   0:00 /usr/sbin/saslauthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2133  0.0  0.0  12068   520 ?        S    Dec22   0:00 /usr/sbin/saslauthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2134  0.0  0.0  12068   520 ?        S    Dec22   0:00 /usr/sbin/saslauthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2135  0.0  0.0  12068   520 ?        S    Dec22   0:00 /usr/sbin/saslauthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2136  0.0  0.0  12068   520 ?        S    Dec22   0:00 /usr/sbin/saslauthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root     12644  0.0  0.0   4580  1432 ?        Ss   10:59   0:00 /usr/lib/postfix/master
postfix  12647  0.0  0.0   4600  1324 ?        S    10:59   0:00 pickup -l -t fifo -u -c
postfix  12648  0.0  0.0   4648  1348 ?        S    10:59   0:00 qmgr -l -t fifo -u
root     12704  0.0  0.0   4388   832 pts/0    S+   11:00   0:00 grep --color=auto postfix
Mon, 12/23/2013 - 10:25
Locutus

Please perform ALL those commands I listed as root. Also, I repeat, please fix the code tags in your post with the mail.log excerpt.

Mon, 12/23/2013 - 16:58 (Reply to #11)
jlgonqui

Dear Locutus, I really want to tell you THANKS for all your patience with me. Really appreciated. I did not change the lasts messages because was the same that I fixed before, now I did all of them for you, promise I was not ignoring you, sorry if I gave the wrong impression. Also I am copying the results with root access. Thanks for helping me out.

root@sipeicesrv:/home/jorge# service postfix restart
 * Stopping Postfix Mail Transport Agent postfix                         [ OK ]
 * Starting Postfix Mail Transport Agent postfix                         [ OK ]
root@sipeicesrv:/home/jorge# netstat -tpln | grep :25
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN                                                         26292/master
tcp6       0      0 :::25                   :::*                    LISTEN                                                         26292/master
root@sipeicesrv:/home/jorge# ps aux | grep postfix
root      2132  0.0  0.0  12068   836 ?        Ss   Dec22   0:00 /usr/sbin/sasla                                                   uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2133  0.0  0.0  12068   520 ?        S    Dec22   0:00 /usr/sbin/sasla                                                   uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2134  0.0  0.0  12068   520 ?        S    Dec22   0:00 /usr/sbin/sasla                                                   uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2135  0.0  0.0  12068   520 ?        S    Dec22   0:00 /usr/sbin/sasla                                                   uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      2136  0.0  0.0  12068   520 ?        S    Dec22   0:00 /usr/sbin/sasla                                                   uthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -n 5
root     26292  0.0  0.0   4580  1436 ?        Ss   17:38   0:00 /usr/lib/postfi                                                   x/master
postfix  26295  0.0  0.0   4600  1324 ?        S    17:38   0:00 pickup -l -t fi                                                   fo -u -c
postfix  26296  0.0  0.0   4756  1532 ?        S    17:38   0:00 qmgr -l -t fifo                                                    -u
postfix  26297  0.0  0.1   4796  1872 ?        S    17:38   0:00 trivial-rewrite                                                    -n rewrite -t unix -u -c
postfix  26298  0.0  0.1   7136  2072 ?        S    17:38   0:00 smtp -t unix -u                                                    -c
root     26401  0.0  0.0   4388   832 pts/0    S+   17:39   0:00 grep --color=au                                                   to postfix
Mon, 12/23/2013 - 18:20
Locutus

Okay, so it looks like Postfix is running okay after you start it with the "service" command. Not sure why Virtualmin would assume it to still be down; might be that it's configured to look in the wrong place for its process ID file.

The key problem message in your mail log seems to be this one:

Dec 21 12:35:48 sipeicenet postfix/trivial-rewrite[3567]: warning: do not list domain sipeicenet.iownyour.org in BOTH mydestination and virtual_alias_domains

This usually occurs when you create the domain part or the full text of your server's FQDN as a Virtualmin server. This is not recommended. What output do you get for these:

hostname
hostname -f

Also, please post the outputs of these:

postconf -n
cat /etc/hosts
cat /etc/hostname
cat /etc/mailname

If that information does not help, please repeat the process that gives you errors, and tell us precisely what you did (send/receive mail from where to where using which IPs etc.), and post log excerpts of the attempt.

Mon, 12/23/2013 - 21:18 (Reply to #13)
jlgonqui

Thanks for all the replies, this is the info you ask me to produce

jorge@sipeicesrv:~$ hostname
sipeicesrv
jorge@sipeicesrv:~$ hostname -f
hostname: Name or service not known
jorge@sipeicesrv:~$ postconf -n
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/
inet_interfaces = all
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mydestination = sipeicenet.iownyour.org, sipeicesrv.home, localhost.home, localhost
myhostname = sipeicesrv.home
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
sender_bcc_maps = hash:/etc/postfix/bcc
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
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
jorge@sipeicesrv:~$ cat /etc/hosts
127.0.0.1       sipeicenet.iownyour.org sipeice localhost
127.0.1.1       sipeicenet.iownyour.org
 
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
jorge@sipeicesrv:~$ cat /etc/hostname
sipeicesrv
jorge@sipeicesrv:~$ cat /etc/mailname
sipeicenet.iownyour.org
Tue, 12/24/2013 - 05:09
Locutus

Okay, there seem to be several discrepancies between your various configuration files. For one, you should decide on one FQDN for your server. You have a variety of "sipeicenet", "sipeicesrv" and "sipeice" in your config files.

Let's say your FQDN is "australis.mydomain.de", and the server's external IP is "1.2.3.4". Then you need the following contents: (postconf output is only an excerpt of the relevant lines)

root@australis:~# cat /etc/hostname
australis
root@australis:~# cat /etc/hosts
127.0.0.1       localhost
1.2.3.4    australis.mydomain.de     australis
 
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
root@australis:~# cat /etc/mailname
australis.mydomain.de
root@australis:~# postconf -n
mydestination = australis.mydomain.de, localhost.mydomain.de, , localhost
myhostname = australis.mydomain.de
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname

Also, do not create the FQDN of your host as a Virtualmin virtual server! It will result in the Postfix warning that you received.

Tue, 12/24/2013 - 16:24 (Reply to #15)
jlgonqui

Ok I will follow this example, what can I do if I have a dynamic external IP? Im using a DNS services

Tue, 12/24/2013 - 16:44
Locutus

Dynamic external IP... are you forwarding to Virtualmin via NAT? Then use the LAN IP instead. Make sure though to use an externally resolvable name as your FQDN.

You'll run into trouble though if you try to operate your own public nameserver on a dynamic IP. You should get a static one or a hosted server for that, or use external nameservers.

NAT / home connections / dynamic IPs make server hosting with Virtualmin (and in general) a lot more complicated.

Topic locked