LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-08-2004, 07:11 AM   #1
Hcman
Member
 
Registered: Jan 2003
Location: Holland
Distribution: OpenBSD 3.6 - Arch Linux 0.7
Posts: 210

Rep: Reputation: 30
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
 
Old 10-09-2004, 12:04 AM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
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:
 
Old 10-09-2004, 03:19 AM   #3
Hcman
Member
 
Registered: Jan 2003
Location: Holland
Distribution: OpenBSD 3.6 - Arch Linux 0.7
Posts: 210

Original Poster
Rep: Reputation: 30
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
 
Old 10-09-2004, 02:46 PM   #4
Hcman
Member
 
Registered: Jan 2003
Location: Holland
Distribution: OpenBSD 3.6 - Arch Linux 0.7
Posts: 210

Original Poster
Rep: Reputation: 30
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
masking email addresses linuxhippy Slackware 3 10-08-2005 09:55 AM
Exim4 on a home desktop not requiring email? Feldon Debian 1 08-22-2005 11:17 AM
Does LQ sell email addresses? klopex LQ Suggestions & Feedback 4 11-12-2004 09:39 AM
Help me make this rewrite rule in Apache ganninu Linux - General 8 01-07-2004 08:30 AM
Multiple email addresses with qmail (same prefix, different domains) Shaolyen Linux - General 1 11-16-2003 11:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration