RE: [Exim] Intermittenty connected host

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Bonis, Wim
Datum:  
To: 'dmitry_v_ivanov@mail.ru'
CC: exim-users
Betreff: RE: [Exim] Intermittenty connected host
> Hello, All
>
> I have a following situation:
> 1.My ISP hold for me a virtual domain(all mail for
> *@mydomain.ru falls in one
> mailbox on ISP mailserver)
> 2.I have three networks with non-internet domains: company ;
> filial1.company ;
> filial2.company, where mail.company is gate for mail from/to
> inet & from/to
> filial*.company. The hosts mail.filial*.company are
> intermittently connected
> to mail.company and are mailservers for their domains.
> The problem is: how can I hold messages for filials on main
> server not in same
> queues, so when filial connects to main server, only mail for
> this network
> is going to delivery?



I do it with omta( http://omta.runlevel.net/ ): The client (fillial) has to
do "ETRN filial1.company". I have a one line Patch for omta to let it use
more than the Standard 1MB Message size. (A constant in a .h file)

In fact everything is dynamic here and driven out of a LDAP server All the
files and queues get created as needed by some rules in exim.

But here are the relevant parts to do it without a LDAP server.

## Global
smtp_etrn_hosts = *
# Startup omta and exim
smtp_etrn_command = "/usr/sbin/exim-etrn \
        \"${if match{$domain}{^[@#]}{${substr_1:$domain}}{$domain}}\""


## Transports:
remote_queue:
driver = pipe
command = "/usr/bin/omta -C/etc/omta/${lc:$domain} -bs"
bsmtp_helo = true
bsmtp = domain
user = mail
group = mail
headers_add = "X-Delivered-To: $original_local_part@$original_domain"
return_fail_output
log_output
delivery_date_add
envelope_to_add
return_path_add
prefix =
suffix =

## DIRECTORS

smart_remote_queue:
driver = smartuser
transport = remote_queue
require_files = /etc/omta/${lc:$domain}
domains = "home.bonis.de:filial1.company:filial2.company"


and /etc/omta/bonis.de looks like:

# your local queue directory
QueueDirectory          /var/spool/omta/home.bonis.de
# your SMTP server
SMTPserver              pluto.k-town.de 25
LocalMTA                "/usr/sbin/sendmail -oi %t"
# Headers to add to each message. The first 3 are generally seen als being
# standard, so don't ommit them unless you're absolutely shure what you're
# doing.
PrependHeader           "Received: from %h(omta/home.bonis.de) %?s{(invoked
by user %u)}%?r{[%F] (HELO: %H)}%bby %f 
(%V) with id %i%bfor %?o{<%r>}%?m{multiple recipients}; %N"
EnforceHeader           "Date: %N"
EnforceHeader           "Message-ID: <%i@%f>"
AppendHeader            "X-Delivered-By: %o %v (%U)"


    
/usr/sbin/exim-etrn:

#!/bin/sh

DOMAIN=$1

if [ -f /etc/omta/$DOMAIN ] ; then
        # And process the queue for $DOMAIN
        /usr/bin/omta -C/etc/omta/$DOMAIN -q
       ## Make suere the serialize gets unlocked
      exec /usr/sbin/exim -R $DOMAIN
else
        # Its not there use exims queue
        exec /usr/sbin/exim -R $DOMAIN
fi


-------------------------------------------------------------------
Wim Bonis             ,+'^'+,                 Telefon:0631-31662-0
          Internet Solution Service GmbH      Technik:0631-31662-15
                       +,.,+                   privat:0631-36071-80
email: bonis@???               67655 Kaiserslautern
Karl-Marx-Str. 13                              --== DPN-POP KL ==--