I asked some time ago a question Send emails with a custom From: field However, still can't get exim4 running. It does send emails, but it is unable to receive any. I'm quite sure this might be because of mail server name and MX configuration.
In my control panel I can set Preference, TTL, and Mail Server values for MX. I leave two first ones as default (0, 6400), and the Mail Server I set to "url.com" (I substituted my domain name with "url" name).
But when I send an email to myself, I get:
in the main log. When I run from my linux console " host -t mx url.com" I get:
;; connection timed out; no servers could be reached
It seems like my MX had no effect at all? What can I do to get it work?
I am very noobie in the subject and even not sure what does "Mail server" refer to? Is it the name that I get by command "host", or maybe "host -f", or maybe "host -i", or maybe even something else? I'm really confused. :/
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:
Update: When I do from Windows:
nslookup -type=mx url.com
I get something like:
Server: UnKnown Address: probably_my_internet_provider's_gate_ip Non-authoritative answer url.com MX preference = 0, mail exchanger = url.com
Update 2: Now I really am confused. I tried to run "dig mx url.com" and "host -t mx url.com" from the other mail linux server (not mine), and it seems to be ok, e.g. the last one results in:
url.com mail is handled by 0 url.com
But where are my e-mails then?? I can't see in ~/Maildir anything. And when I run "mail" I get msg that there's "No mail for root". So does it work, or it doesn't... or what?
Update 3: IS THIS A ROUTING PROBLEM? Now I can see that when I'm trying to send an e-mail from email@example.com, it fails with the following message:
concerning the firstname.lastname@example.org address (so it's not the target "TO" one, but the "FROM" one). It didn't happen before (say a month ago), so I probably messed up some config. :/
When I do, as suggested by some net tutorial:
exim4 -d -bt mail
I get a lot of different "routers" (I'm not even sure if I do understand them properly, though I've read a section in the exim4 documumentation), specifically:
- hubbed_hosts router ("router skipped: domains mismatch")
- dnslookup_relay_to_domains router ("router skipped: domains mismatch")
- dnslookup router ("router skipped: domains mismatch")
- real_local router ("router skipped: prefix mismatch")
- system_aliases router ("system_aliases router declined for email@example.com")
- userforward router ("router skipped: file check")
- procmail router ("router skipped: file check")
- maildrop router ("router skipped: file check")
- lowuid_aliases router ("router skipped: condition failure")
- local_user router (see below):
The last one ends with quite a long response:
--------> local_user router <-------- local_part=mail domain=url.com checking domains cached yes match for +local_domains cached lookup data = NULL url.com in "+local_domains"? yes (matched "+local_domains" - cached) checking local_parts mail in "! root"? yes (end of list) checking for local user seeking password data for user "mail": using cached result getpwnam() succeeded uid=8 gid=8 R: local_user for firstname.lastname@example.org calling local_user router local_user router called for email@example.com domain = url.com set transport maildir_home queued for maildir_home transport: local_part = mail domain = url.com errors_to=NULL domain_data=NULL localpart_data=NULL routed by local_user router envelope to: firstname.lastname@example.org transport: maildir_home email@example.com router = local_user, transport = maildir_home search_tidyup called >>>>>>>>>>>>>>>> Exim pid=31821 terminating with rc=0 >>>>>>>>>>>>>>>>
I wonder now, why does it use "firstname.lastname@example.org", not "email@example.com" here? Is this something normal?
And foremost: Which ROUTER is the one I should be interested in my case, that is when I'm attempting to send a message with (now) a "mail" command from the command line to the foreign e-mail address?