exim4 relay only to specific domain


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users exim4 relay only to specific domain
# 1  
Old 06-30-2008
exim4 relay only to specific domain

Hi,

I am new in exim. I am trying to configure a debian server running exim4 such that it relays only mails to our domain (@abcd.de).The exim server uses a smarthost for relaying. I do not get it to block outgoing mails to domains different from ours (i.e. with the "standard" configuration it sends e-mails everywhere).

I would like something like:
if destination domain = abcd.de do relay through the smarthost
if destination domain != abcd.de reject relay

any idea?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command to flush specific domain in SunOS 5 DNS

Hello to all, May you help saying me how to flush a specific domain in Linux SunOS5 I know the command rndc is to flush DNS cache, but I would like to know: 1- How to do a flush only on specific domain 2- How to see the content of DNS Resolver cache (similar to info given by IPCONFIG... (2 Replies)
Discussion started by: Ophiuchus
2 Replies

2. UNIX Desktop Questions & Answers

exim4

I want to send mail with a bash script. I look on the internet what I have to do. I installed exim4 and mailutils. than I do sudo echo "Yay - SMTP works" | mail -s "Test email" mail-address" but the mail wasn't sent. I find this sudo dpkg-reconfigure exim4-config but I don't know what I... (2 Replies)
Discussion started by: thailand
2 Replies

3. UNIX for Dummies Questions & Answers

postfix config: how to relay mails for only one user of a certain domain

Hello there, First of all I tell you that this is my first postfix installation so please be patient... I have following scenario: fetchmail --> postfix --> amavis-new --> postfix --> exchange 2010. Everything -except exchange ;-)- runs on an opensuse 12.1 box. Now, I have a list of... (2 Replies)
Discussion started by: lpacor
2 Replies

4. UNIX and Linux Applications

postfix config: how to relay mails for only one user of a certain domain

Hello there, First of all I tell you that this is my first postfix installation so please be patient... I have following scenario: fetchmail --> postfix --> amavis-new --> postfix --> exchange 2010. Everything -except exchange ;-)- runs on an opensuse 12.1 box. Now, I have a list of... (0 Replies)
Discussion started by: lpacor
0 Replies

5. UNIX for Advanced & Expert Users

postfix config: how to relay mails for only one user of a certain domain

Hello there, First of all I tell you that this is my first postfix installation so please be patient... I have following scenario: fetchmail --> postfix --> amavis-new --> postfix --> exchange 2010. Everything -except exchange ;-)- runs on an opensuse 12.1 box. Now, I have a list of... (0 Replies)
Discussion started by: lpacor
0 Replies

6. Debian

Debian exim4 security patch

I have just had to fix a debian5 system which suddenly started rejecting correctly addressed emails as '550 relay not permitted.' It turned out that rogue exim4 config files had been injected into the system at /etc/exim4/exim4.conf and /etc/exim4/exim.conf and these were messing up mail routing. ... (0 Replies)
Discussion started by: KevinGB
0 Replies

7. UNIX for Advanced & Expert Users

/etc/init.d/exim4 restart

I have restarted the exim4 process. It prints the following things. $ /etc/init.d/exim4 restart * Stopping MTA for restart /usr/sbin/update-exim4.conf: non-ascii value sugumar_imp.tar write.sql virtualbox-3.1_3.1.8-61349~debian~lenny_i386.deb etc... ...done. * Restarting MTA ... (1 Reply)
Discussion started by: ungalnanban
1 Replies

8. UNIX for Dummies Questions & Answers

EXim4 on Debian - setting up multiple mailboxes

I have exim4 smtp server running on Debian. I tend to use only one user account to login. The machine is running multiple websites and I have assigned unique email addresses for each of the websites. Emails sent to these addresses do not seem to get delivered. Emails sent to the alias that I... (0 Replies)
Discussion started by: shikarishambu
0 Replies

9. Windows & DOS: Issues & Discussions

How to: Linux BOX in Windows Domain (w/out joining the domain)

Dear Expert, i have linux box that is running in the windows domain, BUT did not being a member of the domain. as I am not the System Administrator so I have no control on the server in the network, such as modify dns entry , add the linux box in AD and domain record and so on that relevant. ... (2 Replies)
Discussion started by: regmaster
2 Replies

10. UNIX for Dummies Questions & Answers

iostat for specific domain in Sol9

Hello Everybody, In my Sol9 machine, Im trying to see the IO load occuring on the system, and I need to check the performance for some specific partiotions, I serched If there is any otpion for the iostat command so it can check the IO load for some partiotn and not the whole system, I didnt found... (1 Reply)
Discussion started by: aladdin
1 Replies
Login or Register to Ask a Question
EXIM4_FILES(5)							File Formats Manual						    EXIM4_FILES(5)

NAME
exim4_files - Files in use by the Debian exim4 packages SYNOPSIS
/etc/aliases /etc/email-addresses /etc/exim4/local_host_blacklist /etc/exim4/host_local_deny_exceptions /etc/exim4/local_sender_blacklist /etc/exim4/sender_local_deny_exceptions /etc/exim4/local_sender_callout /etc/exim4/local_rcpt_callout /etc/exim4/local_domain_dnsbl_whitelist /etc/exim4/hubbed_hosts /etc/exim4/passwd /etc/exim4/passwd.client /etc/exim4/exim.crt /etc/exim4/exim.key DESCRIPTION
This manual page describes the files that are in use by the Debian exim4 packages and which are not part of an exim installation done from source. /etc/aliases is a table providing a mechanism to redirect mail for local recipients. /etc/aliases is a text file which is roughly compatible with Send- mail. The file should contain lins of the form name: address, address, ... The name is a local address without domain part. All local domains are handled equally. For more detailed documentation, please refer to /usr/share/doc/exim4-base/spec.txt.gz, chapter 22, and to /usr/share/doc/exim4-base/README.Debian.gz. Please note that it is not possible to use delivery to arbitrary files, directories and to pipes. This is forbidden in Debian's exim4 default configuration. You should at least set up an alias for postmaster in the /etc/aliases file. /etc/email-addresses is used to rewrite the email addresses of users. This is particularly useful for users who use their ISP's domain for email. The file should contain lines of the form user: someone@isp.com otheruser: someoneelse@anotherisp.com This way emails from user will appear to be from someone@isp.com to the outside world. Technically, the from, reply-to, and sender addresses, along with the envelope sender, are rewritten for users that appear to be in the local domain. /etc/exim4/local_host_blacklist is an optional file containing a list of IP addresses, networks and host names whose messages will be denied with the error message "locally blacklisted". This is a full exim 4 host list, and all available features can be used. This includes negative items, and so it is possible to exclude addresses from being blacklisted. For convenience, as an additional method to whitelist addresses from being blocked, an explicit whitelist is read in from /etc/exim4/host_local_deny_exceptions. Entries in the whitelist override corresponding blacklist entries. In the blacklist, the trick is to read a line break as "or" if it follows a positive item, and as "and" if it follows a negative item. For example, a /etc/exim4/local_host_blacklist 192.168.10.0/24 !172.16.10.128/26 172.16.10.0/24 10.0.0.0/8 Exim just evaluates left to right (or up-down in the file listing context), so you don't get the same kind of operator binding as in a pro- gramming language. /etc/exim4/host_local_deny_exceptions contains a list of IP addresses, networks and host names whose messages will be accepted despite the address is also listed in /etc/exim4/local_host_blacklist, overriding a blacklisting. /etc/exim4/local_sender_blacklist is an optional files containing a list of envelope senders whose messages will be denied with the error message "locally blacklisted". This is a full exim 4 address list, and all available features can be used. This includes negative items, and so it is possible to exclude addresses from being blacklisted. For convenience, as an additional method to whitelist addresses from being blocked, an explicit whitelist is read in from /etc/exim4/sender_local_deny_exceptions. Entries in the whitelist override corresponding blacklist entries. In the blacklist, the trick is to read a line break as "or" if it follows a positive item, and as "and" if it follows a negative item. For example, a /etc/exim4/local_sender_blacklist domain1.example !local@domain2.example domain2.example domain3.example Exim just evaluates left to right (or up-down in the file listing context), so you don't get the same kind of operator binding as in a pro- gramming language. /etc/exim4/sender_local_deny_exceptions is an optional file containing a list of envelope senders whose messages will be accepted despite the address being also listed in /etc/exim4/local_sender_blacklist, overriding a blacklisting. /etc/exim4/local_sender_callout is an optional file containing a list of envelope senders whose messages are subject to sender verification with a callout. This is a full exim4 address list, and all available features can be used. /etc/exim4/local_rcpt_callout is an optional file containing a list of envelope recipients for which incoming messages are subject to recipient verification with a call- out. This is a full exim4 address list, and all available features can be used. /etc/exim4/local_domain_dnsbl_whitelist is an optional file containing a list of envelope senders whose messages are exempt from blacklisting via a domain-based DNSBL. This is a full exim4 address list, and all available features can be used. This feature is intended to be used in case of a domain-based DNSBL being too heavy handed, for example listing entire top-level domains for their registry policies. /etc/exim4/hubbed_hosts is an optional file containing a list of route_data records which can be used to override or augment MX information from the DNS. This is particularly useful for mail hubs which are highest-priority MX for a domain in the DNS but are not final destination of the messages, passing them on to a host which is not publicly reachable, or to temporarily fix mail routing in case of broken DNS setups. The file should contain key-value pairs of domain pattern and route data of the form domain: host-list options dict.ref.example: mail-1.ref.example:mail-2.ref.example foo.example: internal.mail.example.com bar.example: 192.168.183.3 which will cause mail for foo.example to be sent to the host internal.mail.example (IP address derived from A record only), and mail to bar.example to be sent to 192.168.183.3. See spec.txt chapter 20.3 through 20.7 for a more detailed explanation of host list format and available options. /etc/exim4/passwd contains account and password data for SMTP authentication when the local exim is SMTP server and clients authenticate to the local exim. The file should contain lines of the form username:crypted-password:clear-password crypted-password is the crypt(3)-created hash of your password. You can, for example, use the mkpasswd program from the whois package to create a crypted password. It is recommended to use md5 hashing, with mkpasswd -H md5. clear-password is only necessary if you want to offer CRAM-MD5 authentication. If you don't plan on doing so, the third column can be omit- ted completely. This file must be readable for the Debian-exim user and should not be readable for others. Recommended file mode is root:Debian-exim 640. /etc/exim4/passwd.client contains account and password data for SMTP authentication when exim is authenticating as a client to some remote server. The file should contain lines of the form target.mail.server.example:login-user-name:password which will cause exim to use login-user-name and password when sending messages to a server with the canonical host name tar- get.mail.server.example. Please note that this does not configure the mail server to send to (this is determined in Debconf), but only creates the correlation between host name and authentication credentials to avoid exposing passwords to the wrong host. Please note that target.mail.server.example is currently the value that exim can read from reverse DNS: It first follows the host name of the target system until it finds an IP address, and then looks up the reverse DNS for that IP address to use the outcome of this query (or the IP address itself should the query fail) as index into /etc/exim4/passwd.client. This goes inevitably wrong if the host name of the mail server is a CNAME (a DNS alias), or the reverse lookup does not fit the forward one. Currently, you need to manually lookup all reverse DNS names for all IP addresses that your SMTP server host name points to, for example by using the host command. If the SMTP smarthost alias expands to multiple IPs, you need to have multiple lines for all the hosts. When your ISP changes the alias, you will need to manually fix that. You may minimize this trouble by using a wild card entry or regular expressions, thus reducing the risk of divulging the password to the wrong SMTP server while reducing the number of necessary lines. For a deeper discussion, see the Debian BTS #244724. password is your SMTP password in clear text. If you do not know about your SMTP password, you can try using your POP3 password as a first guess. This file must be readable for the Debian-exim user and should not be readable for others. Recommended file mode is root:Debian-exim 640. # example for CONFDIR/passwd.client # this will only match if the server's generic name matches exactly mail.server.example:user:password # this will deliver the password to any server *:username:password # this will deliver the password to servers whose generic name ends in # mail.server.example *.mail.server.example:user:password # this will deliver the password to servers whose generic name matches # the regular expression ^smtp[0-9]*.mail.server.example:user:password /etc/exim4/exim.crt contains the certificate that exim uses to initiate TLS connections. This is public information and can be world readable. /usr/share/doc/exim4-base/examples/exim-gencert can be used to generate a private key and self-signed certificate. /etc/exim4/exim.key contains the private key belonging to the certificate in exim.crt. This file's contents must be kept secret and should have mode root:Debian-exim 640. /usr/share/doc/exim4-base/examples/exim-gencert can be used to generate a private key and self-signed certificate. BUGS
Plenty. Please report them through the Debian BTS This manual page needs a major re-work. If somebody knows better groff than us and has more experience in writing manual pages, any patches would be greatly appreciated. SEE ALSO
exim(8), update-exim4.conf(8), /usr/share/doc/exim4-base/, and for general notes and details about interaction with debconf /usr/share/doc/exim4-base/README.Debian.gz AUTHOR
Marc Haber <mh+debian-packages@zugschlus.de> with help from Ross Boylan. EXIM4 Jun 21, 2006 EXIM4_FILES(5)