Mailing List Archive

Changing full name in From: header to something besides www-data
I have been banging my head against the wall trying to solve this problem
all day. I feel like I've read every post that comes up related to
rewriting or hard coding the from header.

1. I have this in /etc/exim4/conf.d/rewrite/31_exim4-config_rewriting

* "User Name <sales@example.com>" Ffrs

And I know this is being used because if I change sales@example.com to
something else, the From header does have that new email in it instead,
still with the www-data username.

I tried setting the GCOS for the www-data user so that the full name field
was "User Name". I also tried this for the Debian-exim user which the
process actually runs as.

I tried putting this add_header in 30_exim4-config_check_rcpt as well as
changing the control variable

accept
hosts = :
control = dkim_disable_verify/submission/sender_retain
add_header = From: User Name <sales@example.com>

No matter what I do I still see this in the logs:

368 SMTP>> MAIL FROM:<sales@example.com> SIZE=8682

and this in the raw email:

From: www-data <sales@example.com>

Can someone please tell me what I'm doing wrong? I'm using this version:

Exim version 4.84_2 #2 built 10-Feb-2018 14:37:59

Thanks so much in advance for any help.

Chad
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Changing full name in From: header to something besides www-data [ In reply to ]
On 2018-07-06, Chad Tindel via Exim-users <exim-users@exim.org> wrote:
> I have been banging my head against the wall trying to solve this problem
> all day. I feel like I've read every post that comes up related to
> rewriting or hard coding the from header.


> 368 SMTP>> MAIL FROM:<sales@example.com> SIZE=8682
>
> and this in the raw email:
>
> From: www-data <sales@example.com>

How are you making these emails?


Possibly you want "control=submission/sender_retain" , (possibly with a
pre-condition) in some ACL somewhere.

--
?

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Changing full name in From: header to something besides www-data [ In reply to ]
> How are you making these emails?

The emails are being sent from an older version of the squirrelcart
e-commerce software. I'm just dockerizing it for a friend, and I need to
use something local to relay messages to AWS SES since this version of
squirrelcart doesn't support smtp auth.

> Possibly you want "control=submission/sender_retain" , (possibly with a
pre-condition) in some ACL somewhere.

Yeah I tried exactly that. This is the top of
my 30_exim4-config_check_rcpt file:

acl_check_rcpt:

# Accept if the source is local SMTP (i.e. not over TCP/IP). We do this by
# testing for an empty sending host field.
accept
hosts = :
control = dkim_disable_verify/submission/sender_retain
add_header = From: User Name <sales@example.com>

Should I be doing it somewhere else? Or is it possible that somewhere else
is stripping off the username? This is just a default debian install so
I'm not doing anything fancy here.

Thanks,

Chad

On Mon, Jul 9, 2018 at 2:53 AM, Jasen Betts via Exim-users <
exim-users@exim.org> wrote:

> On 2018-07-06, Chad Tindel via Exim-users <exim-users@exim.org> wrote:
> > I have been banging my head against the wall trying to solve this problem
> > all day. I feel like I've read every post that comes up related to
> > rewriting or hard coding the from header.
>
>
> > 368 SMTP>> MAIL FROM:<sales@example.com> SIZE=8682
> >
> > and this in the raw email:
> >
> > From: www-data <sales@example.com>
>
> How are you making these emails?
>
>
> Possibly you want "control=submission/sender_retain" , (possibly with a
> pre-condition) in some ACL somewhere.
>
> --
> ?
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Changing full name in From: header to something besides www-data [ In reply to ]
Your control= line is worrying.
I think you need multiple control directive lines.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Changing full name in From: header to something besides www-data [ In reply to ]
On 2018-07-09, Chad Tindel via Exim-users <exim-users@exim.org> wrote:
>> How are you making these emails?
>
> Yeah I tried exactly that. This is the top of
> my 30_exim4-config_check_rcpt file:
>

what do the " <= " lines in the exim log look like?

Squirrelcart is PHP - PHP on linux ususally uses /usr/lib/sendmail
(which is a link exim in your setup) instead of using SMTP for message
submission and thus side-steps all the defualt Debian ACLs. (debian
doesn't define an ACL for not_smtp)

Exim has trusted_groups and trusted_users configutation settings which
list who are allowed to set the envelope sender on local submissions,
make sure that www-data (the user which the web server runs as)
qualifies, and restart both processes.

PHP mail() is fairly broken since about 5.1 as now it only allows one
additional_paramters(sic) largely due to a bug in some popular wordpress
plugin this may or may not be a problem.

--
?

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/