[Pkg-exim4-users] Can not send mail through smarthost

PRAN Boonrasri pran@controlthai.com
Mon, 18 Apr 2005 21:11:33 +0700


This is a multi-part message in MIME format.
--------------090303080701000904030509
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hello!

I have difficulties to manually setup /etc/exim4/exim4.conf. I always get error when I try to send out to smarthost. My smarthost is
'mail.controlthai.com'.

 pran@boonrapr:~$ echo "Test mail" | mail -s "Test Message from PRAN"
support@controlthai.com
 pran@boonrapr:~$ 

And here is the error from # tail -f /var/log/exim4/mainlog

2005-04-18 00:55:11 1DNDzD-0001l4-Do <= pran@controlthai.com U=pran P=local S=376
2005-04-18 00:56:21 1DNDzD-0001l4-Do ** support@controlthai.com R=smart_route
T=remote_smtp: retry time not reached for any host after a long failure period
2005-04-18 00:56:49 1DNE0n-0001l7-Ka <= <> R=1DNDzD-0001l4-Do U=Debian-exim
P=local S=1257
2005-04-18 00:56:49 1DNDzD-0001l4-Do Completed
2005-04-18 00:57:28 1DNE0n-0001l7-Ka ** pran@controlthai.com R=smart_route
T=remote_smtp: retry time not reached for any host after a long failure period
2005-04-18 00:57:28 1DNE0n-0001l7-Ka Frozen (delivery error message) 
2005-04-18 01:10:12 Start queue run: pid=6782
2005-04-18 01:10:12 1DNC0E-0001gh-Dg Message is frozen
2005-04-18 01:10:12 1DMomI-0001KH-6k Message is frozen
2005-04-18 01:10:12 1DMlpQ-0001Dn-7N Message is frozen
2005-04-18 01:10:12 1DMh2e-00012L-UD Message is frozen
2005-04-18 01:10:12 1DMovV-0001KX-3u Message is frozen
2005-04-18 01:10:12 1DMp9T-0001Op-0W Message is frozen
2005-04-18 01:10:12 1DMp7F-0001Oc-CW Message is frozen
2005-04-18 01:10:12 1DNBy7-0001gS-DM Message is frozen
2005-04-18 01:10:12 1DMp3h-0001OE-7D Message is frozen
2005-04-18 01:10:12 1DMo1W-0001Hn-2c Message is frozen
2005-04-18 01:10:12 1DNE0n-0001l7-Ka Message is frozen
2005-04-18 01:10:12 1DNAwA-0001bG-1j Message is frozen
2005-04-18 01:10:12 1DMoXH-0001JU-Q5 Message is frozen
2005-04-18 01:10:12 1DMmFi-0001FM-4a Message is frozen
2005-04-18 01:10:12 1DNAw8-0001bA-4v Message is frozen
2005-04-18 01:10:12 1DNB45-0001br-Fx Message is frozen
2005-04-18 01:10:12 1DNAw6-0001b4-8U Message is frozen
2005-04-18 01:10:12 1DNAyJ-0001bj-NU Message is frozen
2005-04-18 01:10:12 1DMmJY-0001Fe-T1 Message is frozen
2005-04-18 01:10:12 1DNAwB-0001bM-SK Message is frozen
2005-04-18 01:10:12 1DMp4n-0001OM-JW Message is frozen
2005-04-18 01:10:12 1DMmH8-0001FW-E5 Message is frozen
2005-04-18 01:10:12 End queue run: pid=6782

Please help me where should I alter in /etc/exim4/exim4.conf

Below is my /etc/exim4/exim4.conf

domainlist local_domains = @
domainlist relay_to_domains =
hostlist   relay_from_hosts = 127.0.0.1

acl_smtp_rcpt = acl_check_rcpt

qualify_domain = controlthai.com

never_users = root

rfc1413_hosts = *
rfc1413_query_timeout = 30s

ignore_bounce_errors_after = 2d

timeout_frozen_after = 7d

begin acl

acl_check_rcpt:

accept hosts = :

deny message = Restricted characters in address
domains = +local_domains
local_parts = ^[.] : ^.*[@%!/|]

deny message = Restricted characters in address
domains = !+local_domains
local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./

accept local_parts = postmaster
domains = +local_domains

require verify = sender

accept domains = +local_domains
endpass
verify = recipient

accept domains = +relay_to_domains
endpass
verify = recipient


accept hosts = +relay_from_hosts

deny message = relay not permitted

begin routers

smart_route:
 driver = manualroute
 transport = remote_smtp
 domains = ! +local_domains
 route_list = * mail.controlthai.com

system_aliases:
 driver = redirect
 allow_fail
 allow_defer

data = ${lookup{$local_part}lsearch{/etc/aliases}}
 file_transport = address_file
 pipe_transport = address_pipe


userforward:
 driver = redirect
 check_local_user

 file = $home/.forward

 no_verify
 no_expn
 check_ancestor
 file_transport = address_file
 pipe_transport = address_pipe
 reply_transport = address_reply

localuser:
 driver = accept
 check_local_user
 group = Debian-exim
 transport = local_delivery
 cannot_route_message = Unknown user

begin transports

remote_smtp:
 driver = smtp

local_delivery:
 driver = appendfile
 file = /var/mail/$local_part
 delivery_date_add
 envelope_to_add
 return_path_add

address_pipe:
 driver = pipe
 return_output

address_file:
 driver = appendfile
 delivery_date_add
 envelope_to_add
 return_path_add

address_reply:
 driver = autoreply

begin retry

* * F,2h,15m; G,16h,1h,1.5; F,4d,6h

begin rewrite

begin authenticators


THANKS

PRAN


--------------090303080701000904030509
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<div class="moz-text-html" lang="x-western">
<div class="moz-text-plain" wrap="true" graphical-quote="true"
 style="font-family: -moz-fixed; font-size: 12px;" lang="x-western">
<pre wrap="">Hello!

I have difficulties to manually setup /etc/exim4/exim4.conf. I always get error when I try to send out to smarthost. My smarthost is
'mail.controlthai.com'.

 pran@boonrapr:~$ echo "Test mail" | mail -s "Test Message from PRAN"
<a class="moz-txt-link-abbreviated"
 href="mailto:support@controlthai.com">support@controlthai.com</a>
 pran@boonrapr:~$ 

And here is the error from # tail -f /var/log/exim4/mainlog

2005-04-18 00:55:11 1DNDzD-0001l4-Do &lt;= <a
 class="moz-txt-link-abbreviated" href="mailto:pran@controlthai.com">pran@controlthai.com</a> U=pran P=local S=376
2005-04-18 00:56:21 1DNDzD-0001l4-Do ** <a
 class="moz-txt-link-abbreviated" href="mailto:support@controlthai.com">support@controlthai.com</a> R=smart_route
T=remote_smtp: retry time not reached for any host after a long failure period
2005-04-18 00:56:49 1DNE0n-0001l7-Ka &lt;= &lt;&gt; R=1DNDzD-0001l4-Do U=Debian-exim
P=local S=1257
2005-04-18 00:56:49 1DNDzD-0001l4-Do Completed
2005-04-18 00:57:28 1DNE0n-0001l7-Ka ** <a
 class="moz-txt-link-abbreviated" href="mailto:pran@controlthai.com">pran@controlthai.com</a> R=smart_route
T=remote_smtp: retry time not reached for any host after a long failure period
2005-04-18 00:57:28 1DNE0n-0001l7-Ka Frozen (delivery error message) 
2005-04-18 01:10:12 Start queue run: pid=6782
2005-04-18 01:10:12 1DNC0E-0001gh-Dg Message is frozen
2005-04-18 01:10:12 1DMomI-0001KH-6k Message is frozen
2005-04-18 01:10:12 1DMlpQ-0001Dn-7N Message is frozen
2005-04-18 01:10:12 1DMh2e-00012L-UD Message is frozen
2005-04-18 01:10:12 1DMovV-0001KX-3u Message is frozen
2005-04-18 01:10:12 1DMp9T-0001Op-0W Message is frozen
2005-04-18 01:10:12 1DMp7F-0001Oc-CW Message is frozen
2005-04-18 01:10:12 1DNBy7-0001gS-DM Message is frozen
2005-04-18 01:10:12 1DMp3h-0001OE-7D Message is frozen
2005-04-18 01:10:12 1DMo1W-0001Hn-2c Message is frozen
2005-04-18 01:10:12 1DNE0n-0001l7-Ka Message is frozen
2005-04-18 01:10:12 1DNAwA-0001bG-1j Message is frozen
2005-04-18 01:10:12 1DMoXH-0001JU-Q5 Message is frozen
2005-04-18 01:10:12 1DMmFi-0001FM-4a Message is frozen
2005-04-18 01:10:12 1DNAw8-0001bA-4v Message is frozen
2005-04-18 01:10:12 1DNB45-0001br-Fx Message is frozen
2005-04-18 01:10:12 1DNAw6-0001b4-8U Message is frozen
2005-04-18 01:10:12 1DNAyJ-0001bj-NU Message is frozen
2005-04-18 01:10:12 1DMmJY-0001Fe-T1 Message is frozen
2005-04-18 01:10:12 1DNAwB-0001bM-SK Message is frozen
2005-04-18 01:10:12 1DMp4n-0001OM-JW Message is frozen
2005-04-18 01:10:12 1DMmH8-0001FW-E5 Message is frozen
2005-04-18 01:10:12 End queue run: pid=6782

Please help me where should I alter in /etc/exim4/exim4.conf

Below is my /etc/exim4/exim4.conf

domainlist local_domains = @
domainlist relay_to_domains =
hostlist   relay_from_hosts = 127.0.0.1

acl_smtp_rcpt = acl_check_rcpt

qualify_domain = controlthai.com

never_users = root

rfc1413_hosts = *
rfc1413_query_timeout = 30s

ignore_bounce_errors_after = 2d

timeout_frozen_after = 7d

begin acl

acl_check_rcpt:

accept hosts = :

deny message = Restricted characters in address
domains = +local_domains
local_parts = ^[.] : ^.*[@%!/|]

deny message = Restricted characters in address
domains = !+local_domains
local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./

accept local_parts = postmaster
domains = +local_domains

require verify = sender

accept domains = +local_domains
endpass
verify = recipient

accept domains = +relay_to_domains
endpass
verify = recipient


accept hosts = +relay_from_hosts

deny message = relay not permitted

begin routers

smart_route:
 driver = manualroute
 transport = remote_smtp
 domains = ! +local_domains
 route_list = * mail.controlthai.com

system_aliases:
 driver = redirect
 allow_fail
 allow_defer

data = ${lookup{$local_part}lsearch{/etc/aliases}}
 file_transport = address_file
 pipe_transport = address_pipe


userforward:
 driver = redirect
 check_local_user

 file = $home/.forward

 no_verify
 no_expn
 check_ancestor
 file_transport = address_file
 pipe_transport = address_pipe
 reply_transport = address_reply

localuser:
 driver = accept
 check_local_user
 group = Debian-exim
 transport = local_delivery
 cannot_route_message = Unknown user

begin transports

remote_smtp:
 driver = smtp

local_delivery:
 driver = appendfile
 file = <i class="moz-txt-slash"><span class="moz-txt-tag">/</span>var/mail<span
 class="moz-txt-tag">/</span></i>$local_part
 delivery_date_add
 envelope_to_add
 return_path_add

address_pipe:
 driver = pipe
 return_output

address_file:
 driver = appendfile
 delivery_date_add
 envelope_to_add
 return_path_add

address_reply:
 driver = autoreply

begin retry

* * F,2h,15m; G,16h,1h,1.5; F,4d,6h

begin rewrite

begin authenticators


THANKS

PRAN</pre>
</div>
</div>
</body>
</html>

--------------090303080701000904030509--