Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

(solved) exim4

Status
Not open for further replies.

w5000

Technical User
Nov 24, 2010
223
0
0
PL
is it possible with exim4 (on Debian) to get all outgoing mails redirected to one/same email address?

so process all outgoing emails and somehow replace their recipients to one external mail address?
 

you need to configure a 'router' to catch all outgoing messages.



Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
hello Chris,

thank you for your advice.

I have configured router:

catch_all_outgoing:
driver = redirect
data = centralrecipient@remotehost.com
unseen

but now the messages are sent to both: original recipient and to centralrecipient@remotehost.com

how to send it only to the email specified in the redirect router - centralrecipient@remotehost.com ?


Update: Solved by removing "unseen" from the router

 
and by the way, what is the difference in T and t rewriting flags?
while t works for me but T always makes exim PANIC.. (when I set tT in rewriting transport).

E rewrite all envelope fields
F rewrite the envelope From field
T rewrite the envelope To field
b rewrite the Bcc: header
c rewrite the Cc: header
f rewrite the From: header
h rewrite all headers
r rewrite the Reply-To: header
s rewrite the Sender: header
t rewrite the To: header

 
The command word 'unseen' means "continue to process this message with other routers" so removing it should only process your routing instruction.

Exim is a bit of a 'nervous beast' so does 'PANIC' from time to time, in this case it probably is because you have instructed it to rewrite the \envelope-To header twice, Envelope-To is normally written to for message redirection in any case.

Checking /var/log/exim_paniclog should give you more info.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
thank you.

by the way, what is the right step-by-step procedure for adding a router in exim? I could not find any such documentation for new users telling which file should be edited first and which steps should be done one by one. What I did (finally successfully) was rather by trial and error (some docs mentioned about /etc/exim.cfg but such file doesn't exist anywhere on newer Debians).

so, I edited:
/etc/exim4/exim4.conf.template

adding my router below routers section:

catch_all_outgoing:
driver = redirect
data = centralrecipient@remotehost.com

and after that I run:
update-exim4.conf

what caused that router appeared in file:
/var/lib/exim4/config.autogenerated

I also restarted exim4 by:
service exim4 restart


The fun is that creating new router file in /etc/exim4/conf.d/router/ gave no results even after update-exim4.conf so I think this directory is completely ignored by exim4 (at least it didn;t work for me on Debian 8.5 - only change in the config template was considered by the update-exim4.conf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top