PHP sending two copies of every email

twhiting9275

Verified User
Joined
Apr 10, 2004
Messages
66
Location
Cedar Falls, IA
Ok, I'm a bit stumped here. It seems that this ONLY is happening on a DA server, with php configured the same as it would be on every other server I manage.

The problem is that php is sending out two mails for every one that come into it, or is it the pipe? I'm confused here, unfortunately.

Here's the entry from exim mainlog for just ONE of the mails
2006-11-28 01:40:53 1GoxaH-0000wS-KP <= MECHANICS@ H=hostname.linux-tech.net [ip] P=esmtps X=TLSv1:AES256-SHA:256 S=12146 id=001001c712bf$fcc2d930$0000000
0@dexx T="Wicker Man" from <MECHANICS@> for root@localhost
2006-11-28 01:40:54 1GoxaH-0000wS-KP => |/path/to/home/domains/localhost/private_html/pipe/logger.php (root@localhost) <root@localhost> F=<MECHAN
ICS@> R=virtual_aliases T=virtual_address_pipe S=12204
2006-11-28 01:40:54 1GoxaH-0000wS-KP => |/path/to/home/domains/localhost/private_html/pipe/logger.php (root@localhost) <root@localhost> F=<MECHAN
ICS@> R=virtual_aliases_nostar T=virtual_address_pipe S=12204
2006-11-28 01:40:54 1GoxaH-0000wS-KP Completed
Note, the double entry?

The alias for this specific mail address:
root@localhost "|/path/to/domains/localhost/private_html/pipe/logger.php"
Yes, I've edited the domain and real paths out of the alias and the entries, but that's all.

There's only ONE forwarder, yet the mail is getting processed twice?
 
Last edited:
It's the pipe into PHP causing the problem. I've not found a solution on the forum yet.

Regards,
 
After sending the issue to my billing client provider (just on the odd chance he'd seen it), he did in fact find the resolution to this issue.

Not sure why I didn't catch this on my search, but it does in fact work.
To fix this problem you need to remove or comment out "unseen" from your exim.conf.

Example:

virtual_aliases_nostar:
driver = redirect
allow_defer
allow_fail
data = ${if exists{/etc/virtual/${domain}/aliases}{${lookup{$local_part}lsearch{/etc/virtual/${domain}/aliases}}}}
file_transport = address_file
group = mail
pipe_transport = virtual_address_pipe
retry_use_local_part
#unseen
#include_domain = true

Just a quick reference in case someone else runs across the same issue. Might help to have this (or the old thread) made a sticky, because I'm SURE it's come up before.
 
Just update your exim.conf and exim.pl to the latest version:
Not so
In fact, after upgrading to the "latest version", the problem reappeared, after being gone since the fix I posted, and after re-applying the fix posted, well, the problem is gone again.

There is, most definitely a problem with exim configuration when it's parsing one email twice. The above post (mine, not DA Support's) fixes the issue.
 
Hello,

Attempt number 2:

http://files.directadmin.com/services/exim.conf.beta

it requires the updated exim.pl as well. Added a few changes and an extra director to pipe everthing to dev null.

The "unseen" change will work as long as you don't need to save a copy of an email *and* have a forwarder with the same name. This new exim.conf will hopefully allow that and not double pipe.

John
 
A few rbl modifications are needed as relays.ordb.org is going offline very shortly. Jeff is working to merge the above changes with the new rbl changes.. Once the beta file is deemed stable, his changes and the above changes will go into the regular "exim.conf" on the files server and the beta file will be removed.

John
 
Actually ORDB is already offline. Those of you who want a jumpstart can comment out the entire acl section for ORDB, but if you don't you'll have a maximum two second delay for each email processed through ORDB as the DNS call times out.

Otherwise it will continue to work.

I'm now awaiting only one answer from John concerning any change which may have to be made to the latest official DA beta for it to work with Dovecot.. Once I have that answer from John, I can release a beta of a file advanced enough to call SpamBlocker 3.

That should be Friday, December 21st.

SpamBlocker 3 is completely ready and works for me and for several clients. I expect it will go from beta to release candidate to full release before the end of the year.

I've put over 20 hours into SpamBlocker 3 this week and I believe it has many advantages over SpamBlocker 2.

There are four versions:

mbox without ClamAV
Dovecot without ClamAV
mbox with ClamAV
Dovecot with ClamAV

and all will be ready to drop in. (You'll need one additional file set up in /etc/virtual to allow for excluding domains from ClamAV checking if required.)

Look for an announcement tomorrow, Friday, December 21st.

Jeff
 
Back
Top