I'm trying to setup my debian server to download email from a gmail account (e.g.
firstname.lastname@example.org) and then forward it to a 3rd party email. The reason I can't just setup email forwarding within gmail is because I need the headers to reflect that the email is coming from
email@example.com. When I use gmail's forwarding, then it leaves the headers unchanged.
I'm first trying to setup exim4 to just use gmail to send. I set it up as a smarthost via the instructions on the Debian wiki, but when I try to send a test email, it gives me the following errors in the exim4 log:
2011-06-26 06:34:37 1QapTx-0000rh-Cu <= root@ETC_MAILNAME U=root P=local S=360 2011-06-26 06:34:37 1QapTx-0000rh-Cu ** firstname.lastname@example.org: Unrouteable address 2011-06-26 06:34:38 1QapTx-0000rj-R4 Error while reading message with no usable sender address (R=1QapTx-0000rh-Cu): at least one malformed recipient address: root@ETC_MAILNAME - malformed address: _MAILNAME may not follow root@ETC 2011-06-26 06:34:38 1QapTx-0000rh-Cu Process failed (1) when writing error message to root@ETC_MAILNAME (frozen)
Anyone have any idea what might be the issue?
Edit: Running Debian 6.0 "squeeze" and Exim version 4.72 #1 built 12-May-2011 19:03:39
Here is /etc/exim4/exim4.conf:
# /etc/exim4/update-exim4.conf.conf # # Edit this file and /etc/mailname by hand and execute update-exim4.conf # yourself or use 'dpkg-reconfigure exim4-config' # # Please note that this is _not_ a dpkg-conffile and that automatic changes # to this file might happen. The code handling this will honor your local # changes, so this is usually fine, but will break local schemes that mess # around with multiple versions of the file. # # update-exim4.conf uses this file to determine variable values to generate # exim configuration macros for the configuration file. # # Most settings found in here do have corresponding questions in the # Debconf configuration, but not all of them. # # This is a Debian specific file dc_eximconfig_configtype='smarthost' dc_other_hostnames='' dc_local_interfaces='127.0.0.1 ; ::1' dc_readhost='' dc_relay_domains='' dc_minimaldns='false' dc_relay_nets='' dc_smarthost='smtp.gmail.com::587' CFILEMODE='644' dc_use_split_config='false' dc_hide_mailname='false' dc_mailname_in_oh='true' dc_localdelivery='mail_spool'