Dovecot running but mails are not delivered

brivelt

Verified User
Joined
May 1, 2014
Messages
32
Hi,

I do have some issues with delivering e-mails that should be send using phpmail, sendmail etc.

The problem is, when a client adds a contactform to their website, which send the contents to the given emailaddress the email is not delivered but the form tells it has been succesfully sent.

Any ideas?
 
There could be a few issues, first Dovecot does not deliver your email, that is what exim does. But you do need both exim and dovecot to agree to store email the same exact way so that when you connect to dovecot, it knows where to find your email. First thing is to look at your /var/log/exim/mainlog and find where it delivered that message, then double check that your /etc/exim.conf and /etc/dovecot/dovecot.conf files both are configured to use the same mechanism (Maildir). Assuming it was all installed via custombuild you may need to repeat those steps to make sure your config files are correct.
 
Thanks for your reply.

The log tells me the mail has been bounced.

I'm using the following exim config: http://files.directadmin.com/services/exim.conf
and the dovecot config isn't edited. and has mail_location set to: maildir:~/Maildir

I might miss some settings in exim.conf. What are the recommend/required settings in order to deliver an email?
 
If you haven't edited your exim.conf from the one above, then you are delivering email in mbox format to /var/spool/mail/$user and /var/virtual/mail/$domain/$user or something similar to that. You most likely want to go to your custombuild directory and do:
./build todovecot
that should re-write your conf files to use Maildir instead of mbox for mail delivery.

Or, I would recommend you grab the latest spamblocker from Jeff at:
http://www.nobaloney.net/spamblocker.html
that is already configured for Maildir and with some minor edits should work just fine, just make sure your exim.pl is compatible with that version of exim.conf, read the instructions carefully.
 
Hi toml,

I have downloaded the latest spamblocker v4.2.3 and changed the required configurations. I also have the required exim.pl but it's still not working.
 
Without more information no one will be able to help you. There are million reasons it wouldn't work, but the logs are the only way to help figure it out.
 
mainlog:

2015-02-25 16:41:01 cwd=/ 9 args: /usr/sbin/sendmail -FCronDaemon -i -odi -oem -oi -t -f root
2015-02-25 16:41:02 1YQe57-000JeK-JZ <= [email protected] U=root P=local S=882 T="Cron <root@server4> /usr/local/directadmin/dataskq" from <[email protected]> for root
2015-02-25 16:41:02 cwd=/var/spool/exim 4 args: /usr/sbin/exim -odi -Mc 1YQe57-000JeK-JZ
2015-02-25 16:41:02 1YQe57-000JeK-JZ ** [email protected] <[email protected]> F=<[email protected]> R=virtual_aliases:
2015-02-25 16:41:02 cwd=/var/spool/exim 8 args: /usr/sbin/exim -odi -t -oem -oi -f <> -E1YQe57-000JeK-JZ
2015-02-25 16:41:02 1YQe58-000JeN-4M <= <> R=1YQe57-000JeK-JZ U=mail P=local S=1718 T="Mail delivery failed: returning message to sender" from <> for [email protected]
2015-02-25 16:41:02 cwd=/var/spool/exim 4 args: /usr/sbin/exim -odi -Mc 1YQe58-000JeN-4M
2015-02-25 16:41:02 1YQe58-000JeN-4M ** [email protected] <[email protected]> F=<> R=virtual_aliases:
2015-02-25 16:41:02 1YQe58-000JeN-4M Frozen (delivery error message)
2015-02-25 16:41:02 1YQe57-000JeK-JZ Completed
 
mail delivery to root is typically disabled. Try adding something similar to:
root: [email protected]
to the bottom of your /etc/aliases file. That will redirect all root messages to a non-root email account. Obviously you need to change [email protected] to a valid email address you have access to.
 
No difference.

I tried to send an email using a php form.

2015-02-26 11:01:58 cwd=/home/mgbpyhdv/domains/eatthelemon.nl/public_html 5 args: /usr/sbin/sendmail -t -i -f [email protected]
2015-02-26 11:01:58 1YQvGY-000Eqj-Jv <= [email protected] U=mgbpyhdv P=local S=564 T="Website Visitor Message" from <[email protected]> for [email protected]
2015-02-26 11:01:58 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1YQvGY-000Eqj-Jv
2015-02-26 11:01:58 1YQvGY-000Eqj-Jv ** [email protected] F=<[email protected]> R=virtual_aliases:
2015-02-26 11:01:58 cwd=/var/spool/exim 7 args: /usr/sbin/exim -t -oem -oi -f <> -E1YQvGY-000Eqj-Jv
2015-02-26 11:01:58 1YQvGY-000Eqm-Ok <= <> R=1YQvGY-000Eqj-Jv U=mail P=local S=1365 T="Mail delivery failed: returning message to sender" from <> for [email protected]
2015-02-26 11:01:58 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1YQvGY-000Eqm-Ok
2015-02-26 11:01:58 1YQvGY-000Eqj-Jv Completed
2015-02-26 11:01:59 1YQvGY-000Eqm-Ok => mgbpyhdv <[email protected]> F=<> R=localuser T=local_delivery S=1465
2015-02-26 11:01:59 1YQvGY-000Eqm-Ok Completed
 
Try scanning some of the files in /var/spool/exim/input. Specifically one that may be named 1YQvGY-000Eqj-Jv-D (your message id followed by -D ) that should have more information about what the error was.
 
Can't find the file with the message id.

1YRHMv-0015o6-9n-H
mail 8 12
<>
1425029881 0
-ident mail
-received_protocol local
-body_linecount 31
-max_received_linelength 137
-allow_unqualified_recipient
-allow_unqualified_sender
-frozen 1425029881
-localerror
XX
1
[email protected]

144P Received: from mail by server4.lupio.nl with local (Exim 4.76)
id 1YRHMv-0015o6-9n
for [email protected]; Fri, 27 Feb 2015 10:38:01 +0100
040 X-Failed-Recipients: [email protected]
029 Auto-Submitted: auto-replied
060F From: Mail Delivery System <[email protected]>
026T To: [email protected]
059 Subject: Mail delivery failed: returning message to sender
049I Message-Id: <[email protected]>
038 Date: Fri, 27 Feb 2015 10:38:01 +0100
 
That is the file that ended with -H try looking for the one with the -D that is the one that will have the important information in it. This one just tells us what we already know (that it can't be delivered).
 
1YRHMv-0015o6-9n-D
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

[email protected]
(generated from [email protected])


------ This is a copy of the message, including all the headers. ------

Return-path: <[email protected]>
Received: from root by server4.lupio.nl with local (Exim 4.76)
(envelope-from <[email protected]>)
id 1YRHMv-0015o3-3V
for [email protected]; Fri, 27 Feb 2015 10:38:01 +0100
From: [email protected] (Cron Daemon)
To: [email protected]
Subject: Cron <root@server4> /usr/local/directadmin/dataskq
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>
Message-Id: <[email protected]>
Date: Fri, 27 Feb 2015 10:38:01 +0100

/usr/local/directadmin/dataskq: /usr/lib64/libcrypto.so.10: no version information available (required by /usr/local/directadmin/dataskq)
/usr/local/directadmin/dataskq: /usr/lib64/libssl.so.10: no version information available (required by /usr/local/directadmin/dataskq)
 
That really doesn't help either, the real email and not the return one would have been a better choice. Either way, what do you see when you execute:
exim -bt [email protected]
exim -bt [email protected]

I am making a lot of assumptions like all your config files are correct, for example your:
/etc/virtual/domains
/etc/virtual/domainowners
/etc/virtual/lupio.nl/passwd
/etc/virtual/lupio.nl/aliases

Those are the files that should tell exim how to deliver the email to your [email protected] email box. I am also assuming that lupio.nl domain is hosted on the same box.
 
What is the output of the following command:
grep lupio.nl /etc/virtual/domains /etc/virtual/domainowners
 
Back
Top