[debian-edu-commits] [Debian Wiki] Update of "DebianEdu/HowTo/PublicMailServer(SMTP)" by PetterReinholdtsen
Debian Wiki
debian-www at lists.debian.org
Tue Jun 4 06:51:25 UTC 2013
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Debian Wiki" for change notification.
The "DebianEdu/HowTo/PublicMailServer(SMTP)" page has been changed by PetterReinholdtsen:
http://wiki.debian.org/DebianEdu/HowTo/PublicMailServer%28SMTP%29?action=diff&rev1=1&rev2=2
Comment:
A bit more on the recipe.
= Recipe for making the SMTP/IMAP server a public mail server =
- This recipe is based on Debian Edu Squeeze (6), and change the default mail server setup from using the Debian Edu configuration to using the default
+ This recipe is based on Debian Edu Squeeze (6.0), and change the default mail server setup from using the Debian Edu configuration to using the default
- exim4 configuration.
+ exim4 configuration. The original setup is in /etc/exim4/exim-ldap-server-v4.conf, but it is easier to adjust the default exim4 setup than to edit the preloaded setup.
+
+ Setting this up consist of these steps:
+
+ 1. Prepare the default exim4 config to use LDAP for user information.
+ 1. Decide which DNS domain to use for public email (using example.com).
+ 1. Set up the exim4 configuration with the new DNS domain
+ 1. Change mail name for tjener to get valid addresses in outgoing email.
+ 1. Switch to generated contiguration instead of the Debian Edu provided configuration.
+ 1. Add port forwarding in the gateway, allowing connections from the outside for port 25 to make it to tjener.intern
+ 1. Update DNS, add MX entry for the selected DNS domain.
dpkg-reconfigure exim4-config
- Note
- that root email is now delivered to /var/mail/mail, not /var/mail/root
+ Note that root email is now delivered to /var/mail/mail, not /var/mail/root
as before. This is the new default for exim, and I did not try to
change it.
- diff --git a/exim4/conf.d/router/950_exim4_config_ldap_user
+ == Prepare the default exim4 config to use LDAP for user information. ==
+
+ This step add a config fragment to the generated exim4 configuration, telling exim to look up users in the Skolelinux/Debian Edu LDAP directory. It was partly based on the setup found in http://edin.no-ip.com/blog/hswong3i/exim4-ldap-0-0-5-initial-released .
+
+ {{{
- +b/exim4/conf.d/router/950_exim4_config_ldap_user
+ cat > /etc/exim4/conf.d/router/950_exim4_config_ldap_user <<EOF
- new file mode 100644
- index 0000000..319af8d
- --- /dev/null
- +++ b/exim4/conf.d/router/950_exim4_config_ldap_user
- @@ -0,0 +1,11 @@
- +# LDAP Server info
+ # LDAP Server info
- +LDAPBASE = dc=skole,dc=skolelinux,dc=no
+ LDAPBASE = dc=skole,dc=skolelinux,dc=no
- +LDAPSERVER = ldap.intern
+ LDAPSERVER = ldap.intern
- +
+
- +ldap_user:
+ ldap_user:
- + debug_print = "R: ldap_user for $local_part@$domain"
+ debug_print = "R: ldap_user for $local_part@$domain"
- + driver = accept
+ driver = accept
- + condition = ${if eq {}{${lookup ldap
- +{ldap://LDAPSERVER/LDAPBASE?uid?sub?(uid=${local_part})}}}{no}{yes}}
+ condition = ${if eq {}{${lookup ldap {ldap://LDAPSERVER/LDAPBASE?uid?sub?(uid=${local_part})}} }{no}{yes}}
- + cannot_route_message = Recipent ${local_part} unknown.
+ cannot_route_message = Recipent ${local_part} unknown.
- + retry_use_local_part
+ retry_use_local_part
- + transport = LOCAL_DELIVERY
+ transport = LOCAL_DELIVERY
+ EOF
+ chmod 644 /etc/exim4/conf.d/router/950_exim4_config_ldap_user
+ }}}
+
diff --git a/exim4/exim4.conf b/exim4/exim4.conf
deleted file mode 120000
index ae09dd8..0000000
More information about the debian-edu-commits
mailing list