LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Exim4 rewrite rule for multiple email addresses (https://www.linuxquestions.org/questions/linux-general-1/exim4-rewrite-rule-for-multiple-email-addresses-240179/)

Hcman 10-08-2004 07:11 AM

Exim4 rewrite rule for multiple email addresses
 
Hello,

I have Exim set up to handle my outgoing mail through my isp. This works great for a single user with one emailaddress. But now I want to use multiple accounts, i.e. send mail from Mutt using different From-addresses.

I can set almost all headers with folder-hooks from Mutt. Exim however, keeps rewriting the Return-Path hdr to the same address. Is there a way to have Exim use a different Return-Path depending on which address (account) I want to use?

My exim.conf:

Code:

*@hostname    ${lookup{$1}lsearch{/etc/email-addresses}\
                                                                                                          {$value}fail} Ffs

My /etc/email-addresses:
Code:

user:          user@domain.com
(The values above are examples of course)

Arjan

foo_bar_foo 10-09-2004 12:04 AM

the exim.conf file has something about this mine says:
Code:

# If this option is set, then any process that is running as one of the
# listed users may pass a message to Exim and specify the sender's
# address using the "-f" command line option, without Exim's adding a
# "Sender" header.

trusted_users = exim

i bet since mutt uses sendmail command instead of smtp
if you put all users as trusted
trusted_users = exim:user1:user2

maybe exim won't rewrite from:

Hcman 10-09-2004 03:19 AM

Quote:

Originally posted by foo_bar_foo

i bet since mutt uses sendmail command instead of smtp
if you put all users as trusted
trusted_users = exim:user1:user2

maybe exim won't rewrite from:

Thanks for your answer.
I have my username set as trusted user and this causes exim not to write the sender header (it omits it).

I can't add any other users because they are not accounts, just email addresses.
I have one user, say user1 on my box. But I have multiple email addresses (the mail server is with my hosting provider), e.g.
user1@mydomain.com, postmaster@mydomain.com, info@mydomain.com.

What I want is to be able to send mail from my user1 account on my linux box not just as user1@mydomain.com but also as postmaster@mydomain.com etc. with the correct headers set. I can set them all from Mutt except the Return-Path which exim always rewrites.

I'm beginning to wonder if this is even possible...

Arjan

Hcman 10-09-2004 02:46 PM

This isn't possible with a rewrite as far as I can tell.

From Mutt however one can use:
Code:

set sendmail="/usr/sbin/exim -f user1@mydomain.com"
You can also do this per folder with folder-hooks like so:

Code:

folder-hook inbox        'set sendmail="/usr/sbin/exim -f user1@mydomain.com"'
(Don't forget the double quoutes around the sendmail command and also the single quotes around the entire set sendmail command in the folder-hook)

Arjan


All times are GMT -5. The time now is 06:38 AM.