1

note: I did not install any of this manually, this was all installed via the Virtualmin sh install script. I have reinstalled by their script 4 times and have this same issue everytime. Yet no one else seems to have ever delt with this?

Can't get postfix to work in combination with Dovecot, I'm pretty new to this, but this is the data I can think to provide for help on this.

Any help would be greatly appreciated,

The primary issue originally was that Postfix wouldn't even run, then I changed the following line in /etc/postfix/main.cf and added an = to the end.

"permit_sasl_authenticated , permit_mynetworks , reject_unauth_destination ="

as per the guidance of another because those variables are not initialized, it worked to get it running again.

Now I have postfix running but cannot "connect to storage server". If I use the wrong login credentials, I get "failed to login" If I use the right credentials I get "cannot connect to storage server" from roundcube, showing me that dovecot is working fine, but somewhere in transition to talking with Postfix there is a break. ( I assume )

I have no idea where to go from here.

I have excluded any data to other programs that are not affiliated, If I may have left something out, let me know.

I am not seeing anything from postfix in any of the loggs or pulled data though.

SS -tulpan

tcp    LISTEN     0      0                *:25                           *:*                   users:(("master",pid=596,fd=13))
tcp    LISTEN     0      0                *:993                          *:*                   users:(("dovecot",pid=881,fd=38))
tcp    LISTEN     0      0                *:995                          *:*                   users:(("dovecot",pid=881,fd=25))
tcp    LISTEN     0      0               :::110                         :::*                   users:(("dovecot",pid=881,fd=24))
tcp    LISTEN     0      0               :::143                         :::*                   users:(("dovecot",pid=881,fd=37))
tcp    LISTEN     0      0               :::25                          :::*                   users:(("master",pid=596,fd=14))

ss -anlp | grep :25

tcp    LISTEN     0      0         *:25                    *:*                   users:(("master",pid=574,fd=13))
tcp    LISTEN     0      0        :::25                   :::*                   users:(("master",pid=574,fd=14))
tcp    LISTEN     0      0         *:25                    *:*                   users:(("master",pid=574,fd=13))
tcp    LISTEN     0      0        :::25                   :::*                   users:(("master",pid=574,fd=14))

Here is ( ps aux | grep sasl ) Results

root       148  0.0  0.0  71192   976 ?        Ss   03:11   0:00 /usr/sbin/saslauthd -m /run/saslauthd -a pam -n 2 -r
root       149  0.0  0.0  71192   720 ?        S    03:11   0:00 /usr/sbin/saslauthd -m /run/saslauthd -a pam -n 2 -r
root      3135  0.0  0.0   8988   928 pts/0    S+   04:11   0:00 grep --color=auto sasl
[root@dns ~]# ps auxw | grep saslauth
root       148  0.0  0.0  71192   976 ?        Ss   03:11   0:00 /usr/sbin/saslauthd -m /run/saslauthd -a pam -n 2 -r
root       149  0.0  0.0  71192   720 ?        S    03:11   0:00 /usr/sbin/saslauthd -m /run/saslauthd -a pam -n 2 -r
root      3137  0.0  0.0   8988   936 pts/0    S+   04:12   0:00 grep --color=auto saslauth

Shouldn't information for Postfix be here also?

Recent logs from maillog

Dec 21 03:11:40 dns postfix/postfix-script[583]: starting the Postfix mail system
Dec 21 03:11:40 dns postfix/master[596]: daemon started -- version 2.10.1, configuration /etc/postfix
Dec 21 03:11:46 dns dovecot: master: Dovecot v2.2.10 starting up for imap, pop3 (core dumps disabled)
Dec 21 03:11:47 dns spamd[432]: spamd: server started on IO::Socket::IP [127.0.0.1]:783, IO::Socket::IP [::1]:783 (running version 3.4.0)
Dec 21 03:11:47 dns spamd[432]: spamd: server pid: 432
Dec 21 03:11:48 dns spamd[432]: spamd: server successfully spawned child process, pid 890
Dec 21 03:11:48 dns spamd[432]: spamd: server successfully spawned child process, pid 891
Dec 21 03:11:48 dns spamd[432]: prefork: child states: IS
Dec 21 03:11:48 dns spamd[432]: prefork: child states: II
Dec 21 04:53:52 dns dovecot: imap: Error: user (username): Mail access for users with UID 503 not permitted (see first_valid_uid in config file, uid from userdb lookup).
Dec 21 04:53:52 dns dovecot: imap: Error: Invalid user settings. Refer to server log for more information.

systemctl status postfix -l

 Active: active (running) since Wed 2016-12-21 03:11:40 UTC; 3h 24min ago
  Process: 161 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS)
  Process: 150 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, sta                                                         tus=0/SUCCESS)
  Process: 119 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=                                                         0/SUCCESS)
 Main PID: 596 (master)
   CGroup: /system.slice/postfix.service
           |- 596 /usr/libexec/postfix/master -w
           |- 618 qmgr -l -t unix -u
           `-7229 pickup -l -t unix -u

Dec 21 03:11:35 dns systemd[1]: Starting Postfix Mail Transport Agent...
Dec 21 03:11:40 dns postfix/postfix-script[583]: starting the Postfix mail syste                                                         m
Dec 21 03:11:40 dns postfix/master[596]: daemon started -- version 2.10.1, confi                                                         guration /etc/postfix
Dec 21 03:11:40 dns systemd[1]: Started Postfix Mail Transport Agent.
Dec 21 05:04:04 dns postfix/smtpd[4801]: connect from rrcs-69-75-253-234.west.bi                                                         z.rr.com[69.75.253.234]
Dec 21 05:04:07 dns postfix/smtpd[4801]: warning: rrcs-69-75-253-234.west.biz.rr                                                         .com[69.75.253.234]: SASL LOGIN authentication failed: authentication failure
Dec 21 05:04:07 dns postfix/smtpd[4801]: disconnect from rrcs-69-75-253-234.west                                                         .biz.rr.com[69.75.253.234]
Dec 21 06:18:06 dns postfix/smtpd[6817]: connect from rrcs-69-75-253-234.west.bi                                                         z.rr.com[69.75.253.234]
Dec 21 06:18:08 dns postfix/smtpd[6817]: warning: rrcs-69-75-253-234.west.biz.rr                                                         .com[69.75.253.234]: SASL LOGIN authentication failed: authentication failure
Dec 21 06:18:08 dns postfix/smtpd[6817]: disconnect from rrcs-69-75-253-234.west                                                         .biz.rr.com[69.75.253.234]

This remote address that is trying to login via postfi/smtpd is not me, could this "attacker" have anything to do with it?

systemctl status dovecot -l

 Active: active (running) since Wed 2016-12-21 03:11:46 UTC; 3h 25min ago
  Process: 872 ExecStartPre=/usr/libexec/dovecot/prestartscript (code=exited, status=0/SUCCESS)
 Main PID: 881 (dovecot)
   CGroup: /system.slice/dovecot.service
           |- 881 /usr/sbin/dovecot -F
           |- 886 dovecot/anvil
           |- 887 dovecot/log
           |-4184 dovecot/config
           `-4185 dovecot/auth

Dec 21 04:08:08 dns dovecot[887]: imap: Error: Invalid user settings. Refer to server log for more information.
Dec 21 04:40:10 dns auth[3830]: pam_unix(dovecot:auth): check pass; user unknown
Dec 21 04:40:10 dns auth[3830]: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=USERNAME rhost=::1
Dec 21 04:40:13 dns dovecot[887]: imap-login: Disconnected (auth failed, 1 attempts in 3 secs): user=<FULLUSERNAME>, method=PLAIN, rip=::1, lip=:                                             :1, secured, session=<ppp6vyNEHAAAAAAAAAAAAAAAAAAAAAAB>
Dec 21 04:40:29 dns dovecot[887]: imap-login: Login: user=<FULLUSERNAME>, method=PLAIN, rip=::1, lip=::1, mpid=3833, secured, ses                                             sion=<qptWwCNEiAAAAAAAAAAAAAAAAAAAAAAB>
Dec 21 04:40:29 dns dovecot[887]: imap: Error: user USERNAME: Mail access for users with UID 503 not permitted (see first_val                                             id_uid in config file, uid from userdb lookup).
Dec 21 04:40:29 dns dovecot[887]: imap: Error: Invalid user settings. Refer to server log for more information.
Dec 21 04:53:52 dns dovecot[887]: imap-login: Login: user=<FULLUSERNAME>, method=PLAIN, rip=::1, lip=::1, mpid=4187, secured, ses                                             sion=<odB38CNEKgAAAAAAAAAAAAAAAAAAAAAB>
Dec 21 04:53:52 dns dovecot[887]: imap: Error: user FULLUSERNAME: Mail access for users with UID 503 not permitted (see first_val                                             id_uid in config file, uid from userdb lookup).
Dec 21 04:53:52 dns dovecot[887]: imap: Error: Invalid user settings. Refer to server log for more information.

Something to note: When I run "ss" I get a lot of "Cannot open netlink socket: Protocol not supported" apparently because Centos7 Does Not support all of the features that netlink did with ss. So it's possible that some of my collected data is no good. Let me know what you may need and I will provide it.

UPDATE: Postfix has once again gone down. Lol, with new information.

 Active: failed (Result: exit-code) since Wed 2016-12-21 08:35:18 UTC; 25s ago
  Process: 9028 ExecStop=/usr/sbin/postfix stop (code=exited, status=1/FAILURE)
  Process: 12229 ExecStart=/usr/sbin/postfix start (code=exited, status=1/FAILURE)
  Process: 12226 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
  Process: 12222 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)
 Main PID: 596 (code=killed, signal=TERM)

Dec 21 08:35:15 dns systemd[1]: Starting Postfix Mail Transport Agent...
Dec 21 08:35:16 dns postfix/postfix-script[12298]: starting the Postfix mail system
Dec 21 08:35:16 dns postfix/master[12300]: fatal: open lock file /var/lib/postfix/master.lock: unable to set exclusive lock: Resource temporarily unavailable
Dec 21 08:35:17 dns postfix/master[12299]: fatal: daemon initialization failure
Dec 21 08:35:18 dns postfix/postfix-script[12301]: fatal: mail system startup failed
Dec 21 08:35:18 dns systemd[1]: postfix.service: control process exited, code=exited status=1
Dec 21 08:35:18 dns systemd[1]: Failed to start Postfix Mail Transport Agent.
Dec 21 08:35:18 dns systemd[1]: Unit postfix.service entered failed state.
Dec 21 08:35:18 dns systemd[1]: postfix.service failed.

Thanks in advance for any help. Regards, Kyle

0

1 Answer 1

0

Nothing is wrong with Postfix (or the Virtualmin install), as far as I can tell from the information provided.

Your Postfix is being killed with SIGTERM; it doesn't look like it is crashing, it looks like it is being told to shut down. I would guess it is the OOM killer kicking it out because there's not enough memory on the system for everything you're trying to run.

How much memory do you have? Is this system a VPS with so-called "burst RAM" and a much smaller amount of "guaranteed RAM". In a system with "burst RAM", it just means that you will never be able to count on your system to be stable...processes will be killed at random and there's nothing you can do about it, because processes and the kernel don't know what to do with RAM that suddenly disappears; but some hosts over-sell memory and advertise it this way. And, it may just be a VPS with oversold memory, without labeling it "burst RAM".

You can usually find OOM errors (out of memory) errors in the kernel log (just run dmesg to see the recent kernel log entries).

If you do find out of memory errors in the kernel log, you'd need to do one or more of the following:

  1. Add more memory. 768MB is probably the minimum, if you want to run everything Virtualmin manages (mail with AV/spam, web, databases, mailing lists, etc.). Not because Virtualmin is big...it can be as small as about 11-12MB, but because some of the services it manages are very big, particularly ClamAV. If you need to free up memory, but need all the primary services, giving up ClamAV is probably the biggest bang for your buck.
  2. Reduce the number and/or size of services you're running.
  3. Add swap, either a partition or a file. This may or may not be a reasonable solution. If your system is busy on all services (e.g. mail and web and databases all work hard), then swap will just turn the problem from "services stop working sometimes" to "services are all really slow". But, it'll stop the system from killing Postfix due to memory.

We have a guide for reducing memory usage here: https://www.virtualmin.com/documentation/system/low-memory

Edit: Also, I'm not sure what to make of the error you had in your configuration after install. The last test install I did on CentOS didn't have this problem, but if it is reproducible, please file a bug with the steps to reproduce it, so I can get it fixed. It's possible (maybe even probable) that it is caused by the same problem with your system that is causing all the other problems. Installation is pretty demanding of memory, because so many packages get installed and started up at once.

2
  • Ok, I talked to my hosting provider, It is not "Burst Ram" according to them. I have 2G of ram. Also, postfix is running full time, I got that working from changing a line in the /postfix/main.cf file. It hasn't had any problems with shutting down anymore, starts up fine on reboot too. I posted a full response on Virtualmin.com
    – Kyle G
    Dec 21, 2016 at 22:27
  • To answer this question. It turned out being an issue with my hosting service and their setup of OpenVZ, it was improperly installing because they run their system in a strange way that does not allow the full use of what you actually think you have. Switching providers to test soon, will update this then.
    – Kyle G
    Dec 29, 2016 at 22:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .