SHSaeed

Well-Known Member
May 9, 2002
245
0
316
Hi,

I was wondering if anyone knows how to make it so that users can set return-path in emails that are sent from scripts. Currently all return-paths are set to [email protected]
 

bert

Well-Known Member
Aug 21, 2001
602
0
316
You cannot change this unless you make the user nobody a trusted exim user, this is indeed not recommended at all. I would not even try to do it ;)
 

SHSaeed

Well-Known Member
May 9, 2002
245
0
316
We have this customer that is complaining because he says the undelivered emails are routed to nobody and not back to him so he and his users doesn't know what emails that have failed to deliver. I was thinking about setting up a script that checked the failed delivery emails and forwards them to the right person instead of messing with Exim. What do you guys think?
 

Marty

Well-Known Member
Oct 10, 2001
630
1
318
[quote:af653a66fd][i:af653a66fd]Originally posted by moronhead[/i:af653a66fd]

Another solution is to use the -f option in php mail().[/quote:af653a66fd]

explain that? I would like some details on that one.
 

Juanra

Well-Known Member
Sep 22, 2001
777
0
316
Spain
[quote:0b6abd6c1b][i:0b6abd6c1b]Originally posted by (SH)Saeed[/i:0b6abd6c1b]
We have this customer that is complaining because he says the undelivered emails are routed to nobody and not back to him so he and his users doesn't know what emails that have failed to deliver. I was thinking about setting up a script that checked the failed delivery emails and forwards them to the right person instead of messing with Exim. What do you guys think?[/quote:0b6abd6c1b]

Since the -f flag that Moronhead talked about can't be set when safe_mode is on (afaik), I've written an Exim filter which could do the trick:

http://html.conclase.net/cp/scripts/2somebody.txt

Your comments are very welcome.
 

SHSaeed

Well-Known Member
May 9, 2002
245
0
316
The file is password protected. Anyways, we had a customized PHP script created for our company that logs into the returned mail account and forwards all reurned emails to their senders. Works pretty good.
 

Marty

Well-Known Member
Oct 10, 2001
630
1
318
Has anybody tested this filter, and does it work as it should?
 

Marty

Well-Known Member
Oct 10, 2001
630
1
318
Juanra,

I just put your .forward file on my server and it appears to be working. Thank you very much!!
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
[quote:8630d30c97][i:8630d30c97]Originally posted by Juanra[/i:8630d30c97]

[quote:8630d30c97][i:8630d30c97]Originally posted by (SH)Saeed[/i:8630d30c97]
We have this customer that is complaining because he says the undelivered emails are routed to nobody and not back to him so he and his users doesn't know what emails that have failed to deliver. I was thinking about setting up a script that checked the failed delivery emails and forwards them to the right person instead of messing with Exim. What do you guys think?[/quote:8630d30c97]

Since the -f flag that Moronhead talked about can't be set when safe_mode is on (afaik), I've written an Exim filter which could do the trick:

http://html.conclase.net/cp/scripts/2somebody.txt

Your comments are very welcome.[/quote:8630d30c97]


Juanra, I put in the new .forward but I'm getting some errors.

defer (-11): error in forward file: missing or malformed local part (expected word or &&&) in &if first_delivery then&
Return to Mail Queue

Any idea? I followed the instructions to the letter.
 

picasso

Member
Oct 23, 2002
21
0
151
Did you miss out & or has an extra & somewhere in the file?

It should be in this part of the script.
---
else deliver &nobody&
endif
else
deliver &nobody&
endif
else
deliver &nobody&
endif
----

Otherwise you should not get the error.
 

tcwebguy

Active Member
Sep 28, 2001
31
0
306
Checking for .forward

Earlier, you mentioned checking to see if .forward exists.

How do you check for this?