I'm really not into mail configuration, but somehow I managed to configure exim4 and it does send e-mails. I spent so many hours on it though I even can't count. (And I don't know why it is so complicated, while needs are usually very similar: to have e-mails addresses which should be used to actually send e-mails - and that's almost everything, not taking into account a security subject, which is mostly related to authentication).
When I'm sending e-mail, I have automatically set a FROM field as 'root' (linux user). I'd like to have a custom field (e.g. "Contact me"), and I couln't find on internet any answer how to do this.
Second, some say that using linux users as related to email addresses is not a good thing e.g.: http://t-machine.org/index.php/2014/06/27/webmail-on-your-debian-server-exim4-dovecot-roundcube/ But the tutorials I found use them. I'm not using data base as in the url above, but I would still prefer to have no linux user related to email - is it something difficult to achieve? How could I do this?
Here's /etc/exim4/update-exim4.conf.conf content:
# /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='internet'
dc_other_hostnames='url.com; mail.url.com; url; localhost; localhost.localdomain'
dc_local_interfaces='127.0.0.1; my_ip'
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost=''
CFILEMODE='644'
dc_use_split_config='true'
dc_hide_mailname=''
dc_mailname_in_oh='true'
dc_localdelivery='maildir_home'
For any case, I substituted my domain with url and ip with my_ip.
And /etc/email-addresses is very short:
root: [email protected]
dpkg-reconfigure exim4-config
is about all you need to get email working and then editing/etc/email-addresses
is how you easily configure rewriting. Could clarify what your setup is?