Having issues with postfix

3 posts / 0 new
Last post
#1 Wed, 06/19/2013 - 11:43
donnysobonny

Having issues with postfix

Hey guys,

I recently bought a vps with a company called Awardspace. I have spoken to them about this issue for the past few days and unfortunately they have been unable to resolve the problem and are offering to completely whipe the server and start over, which could take days and is something I would very much like to avoid.

Basically, I have in the past few months been learning my way around linux and the webmin framework. I was particularly interested in the postfix application as I was keen to look at a way of building my own interface where my clients can create their own email accounts (instead of using the control panel provided by Awardspace).

Anyways, after running through the documentation and having some real fun with it all, things have suddenly suddenly stopped working. In particular, when emails are sent to the email accounts which were created originally within the Awardspace control panel, they are not received. When emails are sent from these accounts to external servers (yahoo.co.uk for example) they work fine and are recieved at the other end.

Some log file stuff:

When I restart postfix, I get no errors

Jun 19 17:06:50 vps1052 postfix/master[13788]: daemon started -- version 2.7.1, configuration /etc/postfix

However, when an email is sent to one of the email accounts I get these errors

Jun 19 17:07:34 vps1052 postfix/smtpd[13801]: warning: database /etc/aliases.db is older than source file /etc/aliases
Jun 19 17:07:34 vps1052 postfix/smtpd[13801]: connect from nm12-vm0.bullet.mail.ird.yahoo.com[77.238.189.196]
Jun 19 17:07:34 vps1052 postfix/smtpd[13801]: 88FCE48315: client=nm12-vm0.bullet.mail.ird.yahoo.com[77.238.189.196]
Jun 19 17:07:34 vps1052 postfix/cleanup[13806]: 88FCE48315: message-id=<1371658917.84347.YahooMailNeo@web172703.mail.ir2.yahoo.com>
Jun 19 17:07:34 vps1052 postfix/qmgr[13790]: 88FCE48315: from=<donaldsutherland1988@yahoo.co.uk>, size=3216, nrcpt=1 (queue active)
Jun 19 17:07:34 vps1052 postfix/pipe[13807]: 88FCE48315: to=<donny@pixelpug.co.uk>, relay=maildrop, delay=0.23, delays=0.21/0.01/0/0.01, dsn=2.0.0, status=sent (delivered via maildrop service)
Jun 19 17:07:34 vps1052 postfix/qmgr[13790]: 88FCE48315: removed
Jun 19 17:07:34 vps1052 postfix/smtpd[13801]: disconnect from nm12-vm0.bullet.mail.ird.yahoo.com[77.238.189.196]

This is my main.cf file:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = vps1052.vpsunit.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localdomain, localhost, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

virtual_mailbox_domains = hash:/etc/apache2/domains.lst, hash:/etc/apache2/subdomains.lst
virtual_mailbox_base = /var/mail/vhosts
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_uid_maps = static:993
virtual_gid_maps = static:993
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_transport = maildrop:
maildrop_destination_recipient_limit = 1

smtpd_sasl_application_name = smtpd
smtpd_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain =
smtpd_sasl_authenticated_header = yes

smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
virtual_alias_domains = hash:/etc/postfix/virtual

And this is my /virtual file

info@pixelpug.co.uk info@pixelpug.co.uk donny@pixelpug.co.uk

If there is anything else that I can provide that may help to resolve this issue please let me know and I will get the information as quickly as possible.

Thanks in advance for any help.

Wed, 06/19/2013 - 13:20
andreychek

Howdy,

Well, just a quick mention that Virtualmin, a Webmin plugin, is designed to do all of that for you. By simply running the Virtualmin installer (available in the Downloads section above), it will configure the various services on your server, including Postfix, Dovecot, procmail, SpamAssassin, and ClamAV, to handle email delivery.

It'll also provide you and your users with an interface you can use to manage all the users.

So if you did end up starting over -- all you'd need to do is start with a fresh distro install, run the Virtualmin installer, and then you should be up and running. You'd then just need to add your domains and accounts into Virtualmin.

It may save you some hassle down the road, and get a lot of things setup well for you fairly quickly.

However, regarding the problem you're having now -- I don't actually see any errors or problems in the logs. What I see in your mail log is that email is being delivered.

The question would then become -- where is it being delivered to?

Also, what service are you using for IMAP? It's possible it's configured to look for email in a different location than it's being delivered.

In your Postfix config above, I see that "virtual_transport" is set to "maildrop", but "mailbox_command" is set to use procmail. Is it your intention to use maildrop for your users rather than procmail? It looks like the setup above causes the maildrop setting to override procmail... that's okay so long as that's intentional :-)

-Eric

Wed, 06/19/2013 - 14:15
donnysobonny

Hey Eric,

Apologies for maybe sounding like a complete newbie here. I have been a client of Awardspace for about 3 years now, and up until recently upgrading to VPS, I was using shared hosting. Virtually everything (domains, emails, databases etc) were set up through their own control panel, which is what I have personally gotten very used to over the years. This is ultiamtely my first step into looking at how it all works, with the intentions of customizing things a bit further. So yeah, my knowledge on linux as a whole is pretty limited, so my knowledge on Virtualmin is even more so.

With that being said, I am starting to see now that the control panel built by Awardspace is most likely infact a direct interface to Virtualmin...? I really do like your suggestion though. It would be great if I were able to create my own direct interface for Virtualmin...

Forgive me but I don't quite understand the difference between procmail or maildrop. Most of the settings I assume will be the default settings either of Virtualmin, or the settings changed by Awardspace when the server was set up. If my memory serves me correct, the only things that i've touched during my time experimenting with postfix, are the virtual_alias_maps and virtual_alias_domains.

I hate to possibly ask this of you, however I have a few clients that are concerned at the prospect of their emails not working. Could we possibly look into this a bit further? I don't mind giving you access to the server and would be keen to understand it a bit further.

I would be happy to "donate" some beer money your way for your troubles! =p

Topic locked