General troubleshooting tips
- Run "postfix check" to make Postfix look for obvious configuration errors. If it returns no output then no problem was found.
- Read your /var/log/mail.log and look for warnings and errors.
Common problems and solutions
ClamAV fails to scan for viruses
May 7 12:42:28 debian amavis[1834]: (01834-01) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/lib/amavis/tmp/amavis-20110507T124228-01834/parts: lstat() failed: Permission denied. ERROR\n"
You forgot to run
adduser clamav amavis
Missing indentation in the master.cf
The /etc/postfix/master.cf file needs proper indentation. The first line of each service starts in the first column. Additional lines of the same service need to be indented by spaces.
Postfix keeps unwanted emails in the queue
Check that you do not keep soft_bounce enabled. If "postconf soft_bounce" shows "yes" then run "postconf soft_bounce=no".
I get "Permission denied" from Dovecot in the mail.log file
You have the permissions wrong. Run:
chmod -R vmail:vmail /var/vmail
General questions
Why is the database not normalized (email addresses with domain in virtual_users table)?
It's possible to normalize the database and use the JOIN syntax to get the domain name from the virtual_domains table. But that would lead to string operations when Postfix and Dovecot look up a certain email address. This quickly becomes a performance penalty when you have many users. So in this case performance wsas rated higher than strict normalisation.
13 Comments
unsupported dictionary type: smtp-amavis
Submitted by Anonymous (not verified) on
Hello,
First let me say that this is the best written 'How To' I have seen as long as I can remember.
I suspect the root cause of my issue, is trying to do it while my 8 year old was demanding my attention. Anyway here is where I am at.
postfix check returns nothing. (Good)
I can send email to my account from the command line of the mail server and see it in mutt.
I can send email from a remote server, but it does NOT show up in my mailbox. (No bounce as of yet either.)
When I check the logs, I see this everywhere:
Jun 30 17:51:42 mail postfix/smtpd[21132]: fatal: dict_open: unsupported dictionary type: smtp-amavis: Is the postfix-smtp-amavis package installed?
Please make sure that you
Submitted by Christoph Haas on
Please make sure that you have an "smtp-amavis" service defined properly in your /etc/postfix/master.cf. See also the AMaViS chapter.
Can't connect to local MySQL server through socket
Submitted by bakhtiyor (not verified) on
Hi.
Excelent manual in a plain english. I highly appreciate your work. Following your manual I created working mail server and it was working just fine during 2-3 months of its existence. But, it is the second week that I have problems with postfix and mysql. I don't know what has happened with the server (because I am not an administrator of the server) but I am getting 'Can't connect to local MySQL server through socket' error.
I am trying to fix it out for 2 weeks but without any positive results. Could you please give me some hints? Here is the /var/log/mail.log content:
127.0.0.1
Submitted by Christoph Haas on
The right setting is 127.0.0.1 because you can't access the local MySQL server socket without some evil trickery. If your MySQL server is not listening to the "lo" interface then edit your /etc/mysql/my.cnf and set
bind-address = 127.0.0.1
solved
Submitted by bakhtiyor (not verified) on
All right, I am sorry. All the problem was in rules applied in iptables. After correcting those rules everything has come back to work.
Hello again
Submitted by Anonymous (not verified) on
I have set everything up and it is working great, I can use mutt to access both IMAP and telnet to access the smtp to send emails with authentication, everything works great. I even tried from a different linux machine and the results were great.
There is one issue though, none of the User interfaces I've tried works with my server.
Microsoft Outlook
Mail (Apple)
iPhone Mail
and this is a problem, shouldn't that work? when it works for an external adress to use mutt to get onto my imap?
I try to use mail.mydomain.com and same username/password I used in mutt to get in.
Keep getting this
Thanks for a great tutorial, much appriciated
Somehow, I've got to the
Submitted by Anonymous (not verified) on
Somehow, I've got to the conclusion that the IMAP seem to work, but not the SMTP, I've not got the SMTP to work on my Mac, using authentication "password", I dont know what that means, but I suppose it is plain. There are some other options as well, but I dont know how to configure this. Gmail itself cannot connect to the smtp neither.
Is there something i got wrong or is there something I need to do before this will work?
Discovered that SMTP works on
Submitted by Anonymous (not verified) on
Discovered that SMTP works on local network, but when I get on another network it stops working. So rule one gets applied that I'm in the same network I suppose.
What could solve this issue, I use authentication through username (myemail@example.com) and password from mysql. And somehow I dont get properly authed. Even though I use the settings password, in my iphone, mac or similar in pc.
My SMTP does let me enter
Submitted by Anonymous (not verified) on
My SMTP does let me enter through telnet and auth using encode base64 for the username and password.
This is what I do:
telnet mail.mydomain.com 25
helo mydomain.com
auth login
334 VXNlcm5hb6W
DASJKDJASLKFJ== (my email in base64)
334 UGFzc
d558dfjhift75== (my password in base64)
235 Authentication successful
mail from: me@mydomain.com
OK
rcpt to: someone@some-other-domain.com
OK
At this stage if I'm not logged in I get relay error, which is great, as I dont want an open relay. But when I try to telnet from my mobile phone, or more precisely try to telnet to my server from my computer using my phones internet connection. I don't get any connection at all, I can ping the server though.
telnet mail.mydomain.com 25
Trying 191.323.232.133...
And it just pauses here, and my postfix never reach the message and therefore nothing is posted in the logs. I'm sure i opened the port to port 25, as I have done that for all other ports the same way. Opened TCP 25.
Do you have any information what could cause this.
Thanks a milion,
Yours
A newstarter, who loves this guide
Evil ISP?
Submitted by Christoph Haas on
Sounds like your phone internet provider is blocking port 25. This is often done for security reasons and to fight spam. You can probably use your ISP's mail relay to get your email sent.
You could be on to something,
Submitted by Anonymous (not verified) on
You could be on to something, I havn't had any of those issues with nothing else.
So, I see three options,
Change port from 25 (which is not very good I suppose)
Ask my ISP to unlock it (which doesn't seem to have very high probability)
Use some external smtp (which I do not prefer)
Ouch, tough choices here, I have to check with my ISP.
Possible fix seems to be to use :2525 from outside, and forward it to :25, I think that could do. As a start.
Thanks, I didn't even know that could be an issue.
Thanks for a great guide as well!
Could it work if I set it all
Submitted by Anonymous (not verified) on
Could it work if I set it all to secure?
IMAP and SMTP to go by SSL or something? using the 993 and 465 ports?
All Messages Send From root@fqdn
Submitted by Ian Egland (not verified) on
I can both send and receive messages, but the messages I send are always sent from root@<myServers.FullyQualifiedDomain.name> What do I need to do to get the messages to be sent from the user on the virtual domain that wrote them?
Thank you for the great tutorial. Without it, I would never have gotten this far.