Re: [exim] adding a route to exim to accept mail for local d…

Top Page
Delete this message
Reply to this message
Author: Simon B. Taylor
Date:  
To: Ian Eiloart
CC: exim-users@exim.org
Subject: Re: [exim] adding a route to exim to accept mail for local delivery
Hi Ian,
Thanks for the reply.
- I am sure that I want to deliver this mail, it is for a specific purpose.
- mx records are already in place for *.mysite.com and I have verified that they are correct.
- I have had a look at the rewriting options and this will not help me - I need the address to remain intact.
- I have full root access to my server so there is no problem with changing config files.

Basically I need the box to take local delivery of mail to subdomains - it would even be useful to know how to do it for a fixed subdomain and then I can take it further to figure out how the wildcard slots in.
Regards,
Simon.

-----Original Message-----
From: Ian Eiloart [mailto:iane@sussex.ac.uk]
Sent: 14 January 2013 17:41
To: Simon B. Taylor
Cc: exim-users@???
Subject: Re: [exim] adding a route to exim to accept mail for local delivery


On 11 Jan 2013, at 22:15, "Simon B. Taylor" <simon@???>
wrote:

> Hi All,
> Apologies if some of this doesn't make sense as I am fairly new to exim configuration.
> I have a WHM/cPanel box where I want me@??? to be caught by the exim server and handled locally the same as me@??? is - what the aim here is that I have setup a script which catches all non-specified email and will do something with it depending on subdomain and user etc.
> the problem here is that while the message is definitely going to the right server I am getting a 451 response back telling me there will be a delay. email to me@??? works 100%.


You're sure you want to do this? Isn't anything addressed to me@??? going to be spam? There's no reason that it should even be delivered to your mailserver, unless you've published an MX record for anything.mysite.com, but why would you do this for a domain that you aren't using for email.

If you do want to do it, then you should probably set up rewriting for
*@*.mysite.com $1@??? ST

Or something like that. Check chapter 31 of the documentation
http://www.exim.org/exim-html-current/doc/html/spec_html/ch-address_rewriting.html

I don't use WHM, so I'm not sure how you get to edit the config file, but their web site suggests to me that you'll want the advanced editor.

> I can't speficy all the subdomains as these are dynamic so I need a wildcard in here and I am not sure where or how to enter a route with a wildcard into the exim config.
> Here is some detail from my exim - I am not entirely sure how to interpret most of it.
>
> root@mysite [/var/log]# exim -bt blah@???
> LOG: MAIN
> remote host address is the local host: c.mysite.com (while routing <blah@???>)
> blah@??? cannot be resolved at this time: remote host address is the local host
>
> root@mysite [/var/log]# exim -bt blah@???
> LOG: MAIN
> lowest numbered MX record points to local host: c.mysite.com (while routing <blah@???>)
> blah@??? cannot be resolved at this time: lowest numbered MX record points to local host
>
> root@mysite [/var/log]# exim -bt blah@???
> blah@??? -> |/home/pfirelda/ps/mailproc.php
> transport = virtual_address_pipe
>
> root@mysite [/var/log]# exim -d+route -bt blah@???
> Exim version 4.80 uid=0 gid=0 pid=1230 D=fbb95cfd
> Berkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (July 12, 2010)
> Support for: crypteq iconv() IPv6 PAM Perl OpenSSL Content_Scanning DKIM Old_Demime Experimental_SPF Experimental_SRS
> Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch dbm dbmjz dbmnz passwd
> Authenticators: cram_md5 dovecot plaintext spa
> Routers: accept dnslookup ipliteral manualroute queryprogram redirect
> Transports: appendfile/maildir autoreply pipe smtp
> Size of off_t: 8
> Compiler: GCC [4.1.2 20080704 (Red Hat 4.1.2-52)]
> Library version: OpenSSL: Compile: OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
>                          Runtime: OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
> Library version: PCRE: Compile: 8.12
>                       Runtime: 8.12 2011-01-15
> Total 9 lookups
> WHITELIST_D_MACROS unset
> TRUSTED_CONFIG_LIST: "/etc/exim_trusted_configs"
> changed uid/gid: forcing real = effective
>  uid=0 gid=0 pid=1230
>  auxiliary group list: <none>
> seeking password data for user "cpaneleximfilter": cache not available
> getpwnam() succeeded uid=32007 gid=32009
> seeking password data for user "root": cache not available
> getpwnam() succeeded uid=0 gid=0
> changed uid/gid: calling tls_validate_require_cipher
>  uid=47 gid=12 pid=1231
>  auxiliary group list: <none>
> tls_require_ciphers expands to "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP"
> tls_validate_require_cipher child 1231 ended: status=0x0
> configuration file is /etc/exim.conf
> log selectors = 00001dfc 00293043
> trusted user
> admin user
> seeking password data for user "mailnull": cache not available
> getpwnam() succeeded uid=47 gid=47
> seeking password data for user "mailman": cache not available
> getpwnam() succeeded uid=32006 gid=32006
> seeking password data for user "mailman": using cached result
> getpwnam() succeeded uid=32006 gid=32006
> originator: uid=0 gid=0 login=root name=root
> sender address = root@???
> Address testing: uid=0 gid=12 euid=0 egid=12

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> Testing blah@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> Considering blah@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> routing blah@???
> --------> mailman_virtual_router router <--------
> local_part=blah domain=c.mysite.com
> checking require_files
> file check: /usr/local/cpanel/3rdparty/mailman/mail/mailman
> stat() yielded 0
> file check: /usr/local/cpanel/3rdparty/mailman/lists/${lc:$local_part}_${lc:$domain}/config.pck
> expanded file: /usr/local/cpanel/3rdparty/mailman/lists/blah_c.mysite.com/config.pck
> stat() yielded -1
> errno = 2
> mailman_virtual_router router skipped: file check
> --------> mailman_virtual_router_nodns router <--------
> local_part=blah domain=c.mysite.com
> checking domains
> search_open: lsearch "/etc/localdomains"
> search_find: file="/etc/localdomains"
> key="c.mysite.com" partial=-1 affix=NULL starflags=0
> LRU list:
> 4/etc/localdomains
> End
> internal_search_find: file="/etc/localdomains"
> type=lsearch key="c.mysite.com"
> file lookup required for c.mysite.com
> in /etc/localdomains
> lookup failed
> c.mysite.com in "lsearch;/etc/localdomains"? no (end of list)
> c.mysite.com in "+local_domains"? no (end of list)
> mailman_virtual_router_nodns router skipped: domains mismatch
> --------> democheck router <--------
> local_part=blah domain=c.mysite.com
> checking require_files
> file check: +/etc/demouids
> expanded file: /etc/demouids
> stat() yielded 0
> checking "condition"
> search_open: lsearch "/etc/demouids"
> search_find: file="/etc/demouids"
> key="0" partial=-1 affix=NULL starflags=0
> LRU list:
> 4/etc/demouids
> 4/etc/localdomains
> End
> internal_search_find: file="/etc/demouids"
> type=lsearch key="0"
> file lookup required for 0
> in /etc/demouids
> lookup failed
> democheck router skipped: condition failure
> --------> boxtrapper_autowhitelist router <--------
> local_part=blah domain=c.mysite.com
> checking require_files
> file check: +/usr/local/cpanel/bin/boxtrapper
> expanded file: /usr/local/cpanel/bin/boxtrapper
> stat() yielded 0
> checking "condition"
> boxtrapper_autowhitelist router skipped: condition failure
> --------> check_mail_permissions router <--------
> local_part=blah domain=c.mysite.com
> checking domains
> cached no match for +local_domains
> cached lookup data = NULL
> c.mysite.com in "! +local_domains"? yes (end of list)
> checking "condition"
> Starting Perl interpreter
> search_open: passwd "NULL"
> search_find: file="NULL"
> key="nobody" partial=-1 affix=NULL starflags=0
> LRU list:
> 4/etc/demouids
> 4/etc/localdomains
> End
> internal_search_find: file="NULL"
> type=passwd key="nobody"
> database lookup required for nobody
> seeking password data for user "nobody": cache not available
> getpwnam() succeeded uid=99 gid=99
> lookup yielded: *:99:99:Nobody:/:/sbin/nologin
> search_open: lsearch "/etc/domainusers"
> search_find: file="/etc/domainusers"
> key="root" partial=-1 affix=NULL starflags=0
> LRU list:
> 4/etc/domainusers
> 4/etc/demouids
> 4/etc/localdomains
> End
> internal_search_find: file="/etc/domainusers"
> type=lsearch key="root"
> file lookup required for root
> in /etc/domainusers
> lookup failed
> search_open: lsearch "/etc/userdomains"
> search_find: file="/etc/userdomains"
> key="" partial=-1 affix=NULL starflags=0
> LRU list:
> 4/etc/userdomains
> 4/etc/domainusers
> 4/etc/demouids
> 4/etc/localdomains
> End
> internal_search_find: file="/etc/userdomains"
> type=lsearch key=""
> search_open: lsearch "/etc/userdomains"
> cached open
> search_find: file="/etc/userdomains"
> key="mysite.dedicated.co.za" partial=-1 affix=NULL starflags=0
> LRU list:
> 4/etc/userdomains
> 4/etc/domainusers
> 4/etc/demouids
> 4/etc/localdomains
> End
> internal_search_find: file="/etc/userdomains"
> type=lsearch key="mysite.dedicated.co.za"
> file lookup required for mysite.dedicated.co.za
> in /etc/userdomains
> lookup failed
> check_mail_permissions router skipped: condition failure
> --------> enforce_mail_permissions router <--------
> local_part=blah domain=c.mysite.com
> checking domains
> cached no match for +local_domains
> cached lookup data = NULL
> c.mysite.com in "! +local_domains"? yes (end of list)
> checking "condition"
> enforce_mail_permissions router skipped: condition failure
> --------> increment_max_emails_per_hour_if_needed router <--------
> local_part=blah domain=c.mysite.com
> checking domains
> cached no match for +local_domains
> cached lookup data = NULL
> c.mysite.com in "! +local_domains"? yes (end of list)
> checking "condition"
> increment_max_emails_per_hour_if_needed router skipped: condition failure
> --------> boxtrapper_verify_dkim_lookuphost router <--------
> local_part=blah domain=c.mysite.com
> checking domains
> cached no match for +local_domains
> cached lookup data = NULL
> c.mysite.com in "! +local_domains"? yes (end of list)
> checking require_files
> file check: +/var/cpanel/domain_keys/private/${sender_address_domain}
> expanded file: /var/cpanel/domain_keys/private/mysite.dedicated.co.za
> stat() yielded -1
> errno = 2
> boxtrapper_verify_dkim_lookuphost router skipped: file check
> --------> dkim_lookuphost router <--------
> local_part=blah domain=c.mysite.com
> checking domains
> cached no match for +local_domains
> cached lookup data = NULL
> c.mysite.com in "! +local_domains"? yes (end of list)
> checking require_files
> file check: +/var/cpanel/domain_keys/private/${sender_address_domain}
> expanded file: /var/cpanel/domain_keys/private/mysite.dedicated.co.za
> stat() yielded -1
> errno = 2
> dkim_lookuphost router skipped: file check
> --------> boxtrapper_verify_lookuphost router <--------
> local_part=blah domain=c.mysite.com
> checking domains
> cached no match for +local_domains
> cached lookup data = NULL
> c.mysite.com in "! +local_domains"? yes (end of list)
> checking "condition"
> boxtrapper_verify_lookuphost router skipped: condition failure
> --------> lookuphost router <--------
> local_part=blah domain=c.mysite.com
> checking domains
> cached no match for +local_domains
> cached lookup data = NULL
> c.mysite.com in "! +local_domains"? yes (end of list)
> calling lookuphost router
> lookuphost router called for blah@???
> domain = c.mysite.com
> DNS lookup of c.mysite.com (MX) gave NO_DATA
> returning DNS_NODATA
> DNS lookup of c.mysite.com (AAAA) gave NO_DATA
> returning DNS_NODATA
> DNS lookup of c.mysite.com (A) succeeded
> 41.76.208.96 in "<; 127.0.0.0/8 ; 0.0.0.0 ; ::1 ; 0000:0000:0000:0000:0000:ffff:7f00:0000/8"? no (end of list)
> 41.76.208.96 in "+loopback : 64.94.110.0/24"? no (end of list)
> local host found for non-MX address
> fully qualified name = c.mysite.com
> c.mysite.com 41.76.208.96 mx=-1 sort=-242
> LOG: MAIN
> remote host address is the local host: c.mysite.com (while routing <blah@???>)
> lookuphost router: defer for blah@???
> message: remote host address is the local host
> blah@??? cannot be resolved at this time: remote host address is the local host
> search_tidyup called
>>>>>>>>>>>>>>>>> Exim pid=1230 terminating with rc=1 >>>>>>>>>>>>>>>>
>
>
> Any help appreciated.
> Many thanks,
> Simon
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/


--
Ian Eiloart
Postmaster, University of Sussex
+44 (0) 1273 87-3148