[exim] Trying to change sender in system_filter

Top Page
Delete this message
Reply to this message
Author: David Ljung Madison
Date:  
To: exim-users
Subject: [exim] Trying to change sender in system_filter
I have been trying for many days to figure out how to change the
sender of an email in an exim filter.

The reason is because Facebook now requires that email replies
come from the same address as the facebook account, which means
I need to change my sender.

Has anyone figured out how to do this?

My attempts have failed so far:
(with my email address altered)

--------------------------------------------------
if
"$header_to:, $h_cc:" matches "([^<]+@[^>]+facebook.com)" and
$header_from: contains "dave@"
then
## 1) Try to change headers
##
## Doesn't work because the "^From " at the top of the message is still wrong
#headers remove "From"
#headers add "From: MYFACEBOOK@???"

## 2) Try sending mail directly
##
## Doesn't work, mail is "From MAILER-DAEMON" though 'From:' is correct.
#seen mail from "MYFACEBOOK@???" to "$1" text "$message_body"

  ## 3) Try using a pipe to a command that sends the mail
  ##    (The command is a forge wrapper to sendmail, essentially)
  ##
  ## Seems to send the mail out, both "From " and "From: " are
  ## correct but FB still won't accept it.
  seen pipe "forge_pipe -f MYFACEBOOK@??? -F DavidFB '$1'"
endif
--------------------------------------------------


My settings for the system filter in exim4.conf:
--------------------------------------------------
## For #2
message_body_newlines = true
message_body_visible = 2000
## If using #2
#system_filter_user = Debian-exim
#system_filter_reply_transport = address_reply
## If using #3
system_filter_user = dave
system_filter_pipe_transport = address_pipe
## The filter
system_filter = /etc/exim4/Dave.reply-to.filter
--------------------------------------------------

There must be an easy answer for this, no???


Dave

---------------------------------------------------------------------------
Dave Ljung Madison          http://GetDave.com/                415.341.5555
-------- "It don't mean a thing....  if it ain't got that Swing" ----------