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 nobody@ourserver.com.
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 nobody@ourserver.com.
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![]()
Bert Kammerer
Creator of the X Skins[/url]
Another solution is to use the -f option in php mail().
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: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.
Marty Hoskins
TLC Web Enterprises
[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.
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.
Which directory would this filter go in?
John
In my servers the .forward file for user &nobody& is inside the root directory. Check if /.forward exists, and if it contains the address where nobody's mail goes, then that is it.
Has anybody tested this filter, and does it work as it should?
Marty Hoskins
TLC Web Enterprises
Juanra,
I just put your .forward file on my server and it appears to be working. Thank you very much!!
Marty Hoskins
TLC Web Enterprises
[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.
Regards,
David
Forum Moderator
DUP
Regards,
David
Forum Moderator
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.
&nobody& should be replaced by a default nobody address, this way:
Instead of:
deliver &nobody&
write (for example):
deliver admin@yourdomain.com
without the angle brackets. &deliver &nobody&& appears four times in the filter.