nisse

Well-Known Member
Nov 11, 2003
87
0
156
In the top box of the Advanced Exim Configuration Editor, add these lines:

Code:
untrusted_set_sender = *
local_from_check     = false
local_sender_retain  = true
Then in the box underneath "REWRITE CONFIGURATION", add this line:

Code:
nobody@lsearch;/etc/localdomains "${if !eq {$header_From:}{}{$header_sender:$header_From:}fail}" Fs
 

electron33

Well-Known Member
Feb 24, 2004
90
0
166
Wouldn't this reveal the username then? I find it hard to justify changin nobody to username just because some ISP's are being too strict.
 

electron33

Well-Known Member
Feb 24, 2004
90
0
166
That's a very valid point. Fortunately, I've rarely had to deal with spammers on our servers since we pick our customers with extra care. I understand spammers don't have to be our customers and can use the server to do their job. :)
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,983
159
368
SLC
cPanel Access Level
DataCenter Provider
for all you copy & pasters there is a space in the fail} "fai l}" above

you have to close the gap to get it to run

and just a side note it will enter the reply to address in the script if it has one which it should
 

pross

Well-Known Member
Mar 14, 2005
75
0
156
I'm not sure this is working properly...

if i have a mail() with $to $subject and $message and $from the $from gets rewritten as the from address by exim..ok good so far..now if i do the same mail($to,$subjet,$message); without the $from exim now just sends it as nobody at servername.com so is this right?
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
34
473
Go on, have a guess
Yes, that's how it works. If you set the From: field it rewrite the header record, otherwise it sets it as it would do normally.
 

GeekPatrolMille

Well-Known Member
Mar 12, 2004
84
0
156
McKinney, Texas, USA
I experience this error when I implement the solution mentioned above

Configuration file has an invalid syntax. Please try again.
Mail Scanner exim.conf updating...2006-03-07 08:04:49 both local_from_check and local_sender_retain are set; this combination is not allowed
Exim version 4.52 #1 built 16-Aug-2005 05:03:50


I remark the local_sender_retain line to get by error but the local_from_check is found in a non-editable area. This seems like it defeats the purpose. I know I can exit the actual exim config file but is this really what needs to happen to make this solution work?

Just Being cautious...

Thanks,
-greg
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
This is great, but still a lot of "nobody" spam is being sent, e.g. from a simple php newsletter type script, that is until we find it and delete it.

Here's the main header in such a script that goes out with the email:

Received: from nobody by servername.ourdomain.com with local (Exim 4.52)

So how can I tweak this:
nobody@lsearch;/etc/localdomains "${if !eq {$header_From:}{}{$header_sender:$header_From:}fail}" Fs

To also catch this:
Received: from nobody by servername.ourdomain.com with local (Exim 4.52)


By the way, the actual from header is usually something like this:
From: PayPal Inc. <[email protected]>


-----

Here's my guess, but I hesitate to try this in fear of breaking exim:
"from nobody" "${if !eq {$header_Received:}{}{$header_sender:$header_Received:}fail}" Fs


Or would I need to use something like:
from+nobody "${if !eq {$header_Received:}{}{$header_sender:$header_Received:}fail}" Fs
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
947
424
363
cPanel Access Level
DataCenter Provider
This thread is quite old and I just wanted someone to verify that this is still applicable with "new" cPanel, "new" exim configurations etc.

TIA,

Frank
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Hi Frank,

This is how I got it to work:

WHM ---> Exim Configuration Editor ---> Advanced Editor ---> REWRITE CONFIGURATION (then insert this in the field just below):

nobody@lsearch;/etc/localdomains "${if !eq {$header_From:}{}{$header_sender:$header_From:}fail}" Fs