68 lines
1.3 KiB
Plaintext
68 lines
1.3 KiB
Plaintext
dnl values
|
|
define(`HOSTNAME', esyscmd(`echo -n $HOSTNAME'))dnl
|
|
define(`LOCALMAILNAME', esyscmd(`echo -n $LOCALMAILNAME'))dnl
|
|
define(`SMARTHOST', esyscmd(`echo -n $SMARTHOST'))dnl
|
|
define(`SMARTHOST_USER', esyscmd(`echo -n $SMARTHOST_USER'))dnl
|
|
define(`SMARTHOST_PASS', esyscmd(`echo -n $SMARTHOST_PASS'))dnl
|
|
define(`RELAYNETS', esyscmd(`echo -n $RELAYNETS'))dnl
|
|
|
|
ifelse(SMARTHOST, `', `
|
|
errprint(`Error: SMARTHOST not set')
|
|
m4exit(1)
|
|
')
|
|
|
|
ifelse(HOSTNAME, `', `
|
|
errprint(`Error: HOSTNAME not set')
|
|
m4exit(1)
|
|
')
|
|
|
|
dnl template for exim.conf
|
|
|
|
primary_hostname = HOSTNAME
|
|
|
|
acl_smtp_rcpt = acl_check_rcpt
|
|
|
|
tls_certificate = /etc/exim/tls.crt
|
|
tls_privatekey = /etc/exim/tls.key
|
|
|
|
begin routers
|
|
smarthost_route:
|
|
driver = manualroute
|
|
domains = *
|
|
transport = smarthost_smtp
|
|
route_list = * SMARTHOST
|
|
|
|
begin transports
|
|
smarthost_smtp:
|
|
driver = smtp
|
|
port = 25
|
|
multi_domain
|
|
ifelse(SMARTHOST_USER, `', `', `dnl
|
|
hosts_require_auth = *
|
|
')
|
|
|
|
ifelse(SMARTHOST_USER, `', `', `
|
|
begin authenticators
|
|
plain:
|
|
driver = plaintext
|
|
public_name = PLAIN
|
|
client_send = ^SMARTHOST_USER^SMARTHOST_PASS
|
|
|
|
login:
|
|
driver = plaintext
|
|
public_name = LOGIN
|
|
client_send = : SMARTHOST_USER : SMARTHOST_PASS
|
|
')
|
|
|
|
begin acl
|
|
acl_check_rcpt:
|
|
accept
|
|
hosts = RELAYNETS
|
|
deny
|
|
message = "Relaying denied"
|
|
|
|
ifelse(LOCALMAILNAME, `', `', `
|
|
begin rewrite
|
|
*@* ${1}@LOCALMAILNAME Ffrs
|
|
')
|