[Exim] Re: (more info) -oMr with -bS makes message fall into…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Juan Carlos Castro y Castro
Date:  
À: exim-users
Sujet: [Exim] Re: (more info) -oMr with -bS makes message fall into black hole]
I am including my exim.conf here at the end (with theMySQL information
blacked out). Basically, Exim fails all the routers when I try to pipe a
mesage into it with BSMTP.

-------- Original Message --------

I have a Debian system runing Exim 4.34 compiled from sources. We have
many domains, MySQL authentication and Maildir format mailboxes. I try
to run the command line below as the exim user, and I get no delivery.
Eventually I get a bounce saying "Unrouteable address".

/usr/sbin/exim4 -oMr odeiavir-ok -bS </tmp/odeiavir-14538/message.txt

The version information from Exim is this:

Exim version 4.34 #1 built 04-Jun-2004 14:04:04
Copyright (c) University of Cambridge 2004
Berkeley DB: Sleepycat Software: Berkeley DB 3.2.9: (April 7, 2002)
Support for: iconv() IPv6 GnuTLS
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz
dsearch nis nis0 passwd
Authenticators: cram_md5 plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Configuration file is /var/lib/exim4/config.autogenerated

In the /var/log/exim4/mainlog file I get this below. Notice that
cabreu@??? DOES exist; if I try to send mail to him, it arrives.

2004-06-27 20:35:11 1BejB1-0003qR-5q <= exim@??? U=exim
P=local-bsmtp S=974 id=40DF552A.5080706@???
2004-06-27 20:35:11 1BejB1-0003qR-5q ** cabreu@???:
Unrouteable address
2004-06-27 20:35:11 1BejB1-0003qT-8q <= <> R=1BejB1-0003qR-5q
U=Debian-exim P=local S=1777
2004-06-27 20:35:11 1BejB1-0003qR-5q Completed
2004-06-27 20:35:11 1BejB1-0003qT-8q => exim <exim@???>
R=local_user T=mail_spool
2004-06-27 20:35:11 1BejB1-0003qT-8q Completed

And this is the message file I try to pipe into exim:

----------------------------------------------------------------------
MAIL FROM:<jcastro@???>
RCPT TO:<cabreu@???>
DATA
Received: from [200.214.116.3] (helo=vialink.com.br)
       by nobelrj.com.br with esmtp (TLSv1:EDH-RSA-DES-CBC3-SHA:168)
       (Exim 4.32)
       id 1BeisN-0003mP-Dp
       for cabreu@???; Sun, 27 Jun 2004 20:15:55 -0300
Received: from [200.214.116.14] (helo=[10.0.3.18])
       by vialink.com.br with asmtp (Exim 4.32)
       id 1BeisL-00010U-OL
       for cabreu@???; Sun, 27 Jun 2004 20:15:53 -0300
Message-ID: <40DF552A.5080706@???>
Date: Sun, 27 Jun 2004 20:15:54 -0300
From: Juan Carlos Castro y Castro <jcastro@???>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040619
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:  cabreu@???
Subject: Ecagsdhgsdhgscv
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit


BUNDANGA
.
----------------------------------------------------------------------

exim.conf (cleaned up for comments and blank lines) follows. Any clues?

----------------------------------------------------------------------
local_interfaces = 0.0.0.0.25 : 127.0.0.1.10025
daemon_smtp_port = 25
hide mysql_servers = localhost/XXXXXXX/XXXXXXX/XXXXXXX
log_file_path = /var/log/exim/%s
tls_advertise_hosts = *
tls_certificate = /etc/ssl/certs/rsa.pem
tls_privatekey = /etc/ssl/certs/rsa-key.pem
tls_dhparam = /etc/ssl/certs/dhparam.pem
primary_hostname = nobelrj.com.br
domainlist local_domains = ${lookup mysql{SELECT domain FROM TbDomains \
                WHERE domain='$domain'}}
domainlist relay_to_domains = ${lookup mysql{SELECT domain FROM TbDomains \
                WHERE domain='$domain'}}
hostlist   relay_from_hosts = *
acl_smtp_rcpt = acl_check_rcpt
never_users = root
rfc1413_hosts = *
rfc1413_query_timeout = 0s
ignore_bounce_errors_after = 2d
timeout_frozen_after = 5d


begin acl
acl_check_rcpt:
  accept  hosts = : 127.0.0.1
  deny    local_parts   = ^.*[@%!/|]
  accept  local_parts   = postmaster
          domains       = +local_domains
   require verify        = sender
       deny    message       = mensagem rejeitada porque $_sender_host_address esta bloqueada por spam na lista $dnslist_domain\n$dnslist_test\n\nrejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
       dnslists      = relays.ordb.org=127.0.0.2 : sbl.spamhaus.org=127.0.0.3  : bl.spamcop.net=127.0.0.4 : dev.null.dk=127.0.0.5 : dialups.services.net=127.0.0.6
  accept  domains       = +local_domains
          endpass
          message       = unknown user
          verify        = recipient
  accept  domains       = +relay_to_domains
          endpass
          message       = unrouteable address
          verify        = recipient
  accept  authenticated = *
  deny    message       = relay not permitted


begin routers
dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more
mysql_aliases:
driver = redirect
file_transport = address_file
pipe_transport = address_pipe
data = ${lookup mysql{SELECT redirect FROM TbMailRedirects WHERE (username='$local_part' AND domain='$domain') OR (username='*' AND domain='$domain')}}
mysql_autorespond:
driver = accept
condition = ${if eq{} {${lookup mysql{SELECT autoresponder FROM TbUsers WHERE autoresponder='1' AND username='$local_part' AND domain='$domain' AND active='1'}}}{no}{yes}}
no_verify
no_expn
unseen
transport = address_mysql
mysqluser:
driver = accept
condition = ${if eq{} {${lookup mysql {SELECT username FROM TbUsers WHERE username='$local_part' AND domain='$domain'}}}{no}{yes}}
transport = local_delivery

begin transports
odeiavirscan:
driver = pipe
batch_max = 1000
use_bsmtp
command = /usr/local/bin/odeiavir -exim $sender_address $local_part $domain -pipe
user = exim
local_delivery:
driver = appendfile
transport_filter = /usr/local/bin/odeiavir -exim $sender_address $local_part $domain
user = exim
group = mail
mode = 0660
mode_fail_narrower = false
envelope_to_add = true
return_path_add = true
maildir_format
directory_mode=0777
directory = /var/mail/$domain/${local_part}/Maildir
quota = ${lookup mysql{SELECT quota_mail FROM TbUsers WHERE username='$local_part' AND domain='$domain'}{$value}{10M}}
quota_warn_threshold = 80%
quota_warn_message = "\
To: $local_part@$domain\n\
Subject: Sua caixa postal $domain\n\n\
Esta mensagem foi criada automaticamente pelo servidor de smtp (mail)\n\
do domínio $domain.\n\n\
O tamanho da sua caixa postal está chegando perto do limite.\n\
Por favor, remova alguns emails de sua caixa postal para evitar\n\
a possibilidade de haver mensagens devolvidas.\n\n\
Se você tiver algum problema ou precisar de ajuda, entre em contato\n\
com o suporte.\n\n\
----------------------------------------------------------------\n\n\
This message is automatically created by the mail delivery software\n\
at $domain.\n\n\
The size of your mailbox has exceeded a warning threshold that is\n\
set by the system administrator. Please remove mails from your\n\
mailbox in order to avoid possible rejection of incoming mail.\n\n\
Feel free to contact our tech support if you encounter any problems."
address_pipe:
driver = pipe
path = /usr/bin:/bin:/usr/local/bin
return_fail_output
address_file:
driver = appendfile
envelope_to_add = true
return_path_add = true

address_directory:
driver = appendfile
address_reply:
driver = autoreply

remote_smtp:
  transport_filter = /usr/local/bin/odeiavir -exim $sender_address $local_part $domain
  driver = smtp
address_mysql:
  driver   = autoreply
  reply_to = "${local_part}@${domain}"
  to       = ${sender_address}
  subject  = ${lookup mysql{SELECT arsubject FROM TbUsers WHERE username='$local_part' AND domain='$domain'}{$value}{Resposta automatica de ${local_part}@${domain}}}
  text     = ${lookup mysql{SELECT artext FROM TbUsers WHERE username='$local_part' AND domain='$domain'}{$value}}


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


begin rewrite

begin authenticators
fixed_login:
 driver = plaintext
 public_name = LOGIN
 server_prompts = Username:: : Password::
 server_condition = "${if and { \
                      {eq {$interface_port}{25}} \
              {!eq{$1}{}} \
                      {!eq{$2}{}} \
                      {crypteq{$2}{\\{md5\\}${lookup mysql{SELECT crypt_md5 FROM TbUsers WHERE username='${local_part:$1}' AND domain='${domain:$1}'}{$value}fail}}} \
                      } {yes}{no}}"
 server_set_id = $1
fixed_plain:
 driver = plaintext
 public_name = PLAIN
 server_prompts = :
 server_condition = "${if and { \
                      {eq {$interface_port}{25}} \
              {!eq{$2}{}} \
                      {!eq{$3}{}} \
                      {crypteq{$3}{\\{md5\\}${lookup mysql{SELECT crypt_md5 FROM TbUsers WHERE username='${local_part:$2}' AND domain='${domain:$2}'}{$value}fail}}} \
                      } {yes}{no}}"
 server_set_id = $2
----------------------------------------------------------------------