<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>postfix &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/postfix/</link>
	<description>Feed of posts on WordPress.com tagged "postfix"</description>
	<pubDate>Fri, 27 Nov 2009 14:17:57 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Mail~Server dgn Linux SuSe 11.1]]></title>
<link>http://pegallinux007.wordpress.com/2009/11/26/mailserver-dgn-linux-suse-11-1/</link>
<pubDate>Thu, 26 Nov 2009 03:20:30 +0000</pubDate>
<dc:creator>pegallinux007</dc:creator>
<guid>http://pegallinux007.wordpress.com/2009/11/26/mailserver-dgn-linux-suse-11-1/</guid>
<description><![CDATA[Awal&#8217;y cuma penasaran dengan System yang dijelaskan oleh teman tentang Mail-Server&#8230; lalu]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Awal&#8217;y cuma penasaran dengan System yang dijelaskan oleh teman tentang Mail-Server&#8230;</p>
<p>lalu saya coba membuat sendiri dengan searching&#8221; ke oM Google tentang pembuatan mail-server dgn linux, disitu saya dah cobe dengan berbagai macam packet&#8221; yang diperlukan untuk pembuatan mail-server. Dari semua paket yang di Referensikan yang berfungsi untuk menerima Email (POP3, IMAP &#38; IMAPS) ternyata yang paling mudah adalah dengan packet <strong>Dovecot</strong>, untuk settingan&#8217;y sangat sedikit dan mudah. Tp untuk pengiriman Email masih pakai yang standart yaitu <strong>Postfix</strong> dan  untuk anti Spam memakai <strong>Spammasin</strong>.</p>
<p style="text-align:left;">okeh kita mulai ke tahap Installasi&#8230;</p>
<p style="text-align:left;">download Suse 11.1 <a href="http://www.cyberciti.biz/tips/download-opensuse-111.html" target="_blank">di sini</a> lalu burn .ISO hasil download tersebut ke DVD karena size&#8217;y lumayan besar sekitar 4.5Gb ;P.</p>
<p style="text-align:left;">siapkan PC yang spect&#8217;y lumayan bagus tp bisa juga dengan spect yang biasa aja soal&#8217;y tidak terlalu penting, tp untuk Suse 11.1 ini harus yang diatas i386 takut&#8217;y nanti gak kuat.</p>
<p style="text-align:left;">rubah Pc ke boot CD lalu tinggal ikuti langkah yang ada di tahap installasi, namun pada bagian pemilihan <strong>Packet/Software</strong> anda pilih costum agar packet&#8221; yang diperlukan bisa di pilih secara manual.</p>
<p style="text-align:left;">untuk packet&#8221;nya yaitu :</p>
<p style="text-align:left;">- openssh              : untuk remote Server dari client<br />
- postfix                    : untuk packet MTA (Mail Transef Agen/pengiriman Email)<br />
- Dovecote         : Untuk POP3,Imap (incoming mail)<br />
- Spammasin : untuk anti Spam</p>
<p>setelah semua terinstall kita masuk ke tahap editing script, untuk edit bisa dilakukan di client dengan memakai <strong>Putty</strong> dengan catatan <strong>Firewall</strong> yang ada di server di <strong>matikan(Disable)</strong>. untuk settingan&#8217;y ada di <strong>Network Device</strong> -&#62; <strong>Network Setting </strong>-&#62; <strong>Overview</strong> -&#62; <strong>pilih LAN(NIC) yang dipakai</strong> -&#62; <strong>Edit</strong> -&#62; <strong>General</strong> -&#62; <strong>Firewall Zone</strong> = <strong><em>Firewall Disable</em>.</strong></p>
<p><strong>@Postfix</strong></p>
<p>Edit postfix dengan perintah:</p>
<p>mail:~ # vi /etc/postfix/main.cf</p>
<p>lalu rubah pada baris<br />
myhostname = hostname.Domainanda.com<br />
inet_interfaces = all<br />
masquerade_domains = domainanda.com<br />
mynetworks = 192.168.1.0/24, 127.0.0.0/8 *note : sesuai dgn class IP yang dipakai perusahaan.<br />
relayhost = domainanda.com</p>
<p>lalu Save script yang tadi di edit dengan cara Esc-&#62;shift titik dua (:)-&#62;wq!(tanda seru)</p>
<p>ex= :wq!</p>
<p>restart postfix<br />
mail:~# /etc/init.d/postfix restart</p>
<p><strong>@Dovecote</strong></p>
<p>Edit Dovecote dengan perintah:</p>
<p>mail:~ # vi /etc/dovecot/dovecot.conf</p>
<p>lalu rubah pada baris<br />
#protocols = imap imaps<br />
jadi<br />
protocols = pop3 imap</p>
<p>#disable_plaintext_auth = yes<br />
manjadi<br />
disable_plaintext_auth = no</p>
<p>#pop3_uidl_format = %08Xu%08Xv<br />
menjadi<br />
pop3_uidl_format = %08Xu%08Xv</p>
<p>*note : hilangkan semua Crass(#) supaya script tsb berfungsi.</p>
<p>lalu Save script yang tadi di edit dengan cara Esc-&#62;shift titik dua (:)-&#62;wq!(tanda seru)</p>
<p>ex= :wq!</p>
<p>restart dovecote<br />
mail:~# /etc/init.d/dovecote restart</p>
<p>pembuatan User untuk Email.</p>
<p>mail:~# yast<br />
masuk pada:<br />
<strong>Network Service </strong>-&#62; <strong>Mail Transfer Agent</strong> -&#62; <strong>Email Server Configuration</strong> = <strong>Next</strong> -&#62; <strong>General Setting</strong> = <strong>Next</strong><br />
<strong>Outgoing Mail</strong> isi dengan domain perusahaan ex : mail.public.com<br />
<strong>Authentication</strong> isi dengan domain perusahaan ex : mail.public.com<br />
<strong>User name</strong> isi dengan nama user ex: chairul<br />
<strong>password</strong> isi dengan standart mail yang digunakan<br />
lalu OK<br />
lalu Next</p>
<p><strong>Incoming Mail</strong><br />
select [x] Accept remote SMTP connections</p>
<p>masuk ke Detail -&#62; Add</p>
<p>Mail download<br />
Server<br />
isi dengan Domainanda.com ex: mail.public.com<br />
Protocol<br />
POP3<br />
Remote user name<br />
useremail@domainanda.com ex:chairul@public.com<br />
password<br />
isi dengan pass yang dipakai di mail<br />
local user<br />
usermail ex:chairul<br />
lalu OK<br />
lalu Finish</p>
<p>Security and Users -&#62; User and Group Management<br />
User and Group Administation<br />
Users -&#62; Add<br />
User&#8217;s name full<br />
usermail ex: chairul<br />
Username<br />
usermail ex: chairul<br />
Password<br />
isi dengan pass yang dipakai di mail<br />
Confirm password</p>
<p>Checklist pada [X] Receive System Mail<br />
lalu OK<br />
lalu OK<br />
lalu Quit</p>
<p>restart postfix dan dovecot</p>
<p>untuk test smtp dan pop3</p>
<p>telnet domainanda.com 25<br />
telnet domainanda.com 110</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Postfix - local_recipients.cf]]></title>
<link>http://davidatenney.wordpress.com/2009/11/25/local_recipients-cf/</link>
<pubDate>Wed, 25 Nov 2009 02:54:12 +0000</pubDate>
<dc:creator>davidatenney</dc:creator>
<guid>http://davidatenney.wordpress.com/2009/11/25/local_recipients-cf/</guid>
<description><![CDATA[bind = yes bind_dn = uid=vmail,o=hosting,dc=DOMAIN,dc=COM bind_pw = PASSWORD server_host = ldap://IP]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>bind = yes<br />
bind_dn = uid=vmail,o=hosting,dc=DOMAIN,dc=COM<br />
bind_pw = PASSWORD<br />
server_host = ldap://IPADDRESS<br />
search_base = o=hosting,dc=DOMAIN,dc=COM<br />
query_filter = (mail=%s)<br />
result_attribute = uid</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Postfix - mail_from_login.cf]]></title>
<link>http://davidatenney.wordpress.com/2009/11/25/mail_from_login-cf/</link>
<pubDate>Wed, 25 Nov 2009 02:53:20 +0000</pubDate>
<dc:creator>davidatenney</dc:creator>
<guid>http://davidatenney.wordpress.com/2009/11/25/mail_from_login-cf/</guid>
<description><![CDATA[version = 3 debuglevel = 0 server_host = ldap://IPADDRESS bind = yes bind_dn = uid=vmail,o=hosting,d]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>version = 3<br />
debuglevel = 0<br />
server_host = ldap://IPADDRESS<br />
bind = yes<br />
bind_dn = uid=vmail,o=hosting,dc=DOMAIN,dc=COM<br />
bind_pw = PASSWORD<br />
search_base = o=hosting,dc=DOMAIN,dc=COM<br />
#query_filter = (mail=%s)<br />
query_filter = (&#124;(mail=%s)(maildrop=%s))<br />
result_attribute = mail</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Postfix - network_table]]></title>
<link>http://davidatenney.wordpress.com/2009/11/25/network_table/</link>
<pubDate>Wed, 25 Nov 2009 02:48:42 +0000</pubDate>
<dc:creator>davidatenney</dc:creator>
<guid>http://davidatenney.wordpress.com/2009/11/25/network_table/</guid>
<description><![CDATA[localhost OK 127.0.0.1 OK IPADDRESSES OK]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>localhost       OK<br />
127.0.0.1       OK<br />
IPADDRESSES   	OK</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Postfix - transport]]></title>
<link>http://davidatenney.wordpress.com/2009/11/25/transport/</link>
<pubDate>Wed, 25 Nov 2009 02:48:01 +0000</pubDate>
<dc:creator>davidatenney</dc:creator>
<guid>http://davidatenney.wordpress.com/2009/11/25/transport/</guid>
<description><![CDATA[DOMAINNAME.COM maildrop: HYLAFAXSERVER smtp:[IPADDRESS] LISTS.DOMAINNAME.COM mailman:]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>DOMAINNAME.COM		maildrop:<br />
HYLAFAXSERVER		smtp:[IPADDRESS]<br />
LISTS.DOMAINNAME.COM	mailman:</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Postfix - master.cf]]></title>
<link>http://davidatenney.wordpress.com/2009/11/25/master-cf/</link>
<pubDate>Wed, 25 Nov 2009 02:46:33 +0000</pubDate>
<dc:creator>davidatenney</dc:creator>
<guid>http://davidatenney.wordpress.com/2009/11/25/master-cf/</guid>
<description><![CDATA[smtp inet n &#8211; n &#8211; &#8211; smtpd smtps inet n &#8211; n &#8211; - smtpd -o smtpd_sasl_aut]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>smtp      inet  n       &#8211;       n       &#8211;       &#8211;       smtpd<br />
smtps   inet n   &#8211;   n   &#8211; - smtpd<br />
      -o smtpd_sasl_auth_enable=yes<br />
      -o smtpd_reject_unlisted_sender=yes<br />
      -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject<br />
      -o broken_sasl_auth_clients=yes<br />
pickup    fifo  n       &#8211;       n       60      1       pickup<br />
cleanup   unix  n       &#8211;       n       &#8211;       0       cleanup<br />
qmgr      fifo  n       &#8211;       n       300     1       qmgr<br />
tlsmgr    unix  &#8211;       &#8211;       n       1000?   1       tlsmgr<br />
rewrite   unix  &#8211;       &#8211;       n       &#8211;       &#8211;       trivial-rewrite<br />
bounce    unix  &#8211;       &#8211;       n       &#8211;       0       bounce<br />
defer     unix  &#8211;       &#8211;       n       &#8211;       0       bounce<br />
trace     unix  &#8211;       &#8211;       n       &#8211;       0       bounce<br />
verify    unix  &#8211;       &#8211;       n       &#8211;       1       verify<br />
flush     unix  n       &#8211;       n       1000?   0       flush<br />
proxymap  unix  &#8211;       &#8211;       n       &#8211;       &#8211;       proxymap<br />
smtp      unix  &#8211;       &#8211;       n       &#8211;       &#8211;       smtp<br />
relay     unix  &#8211;       &#8211;       n       &#8211;       &#8211;       smtp<br />
	-o fallback_relay=<br />
showq     unix  n       &#8211;       n       &#8211;       &#8211;       showq<br />
error     unix  &#8211;       &#8211;       n       &#8211;       &#8211;       error<br />
discard   unix  &#8211;       &#8211;       n       &#8211;       &#8211;       discard<br />
local     unix  &#8211;       n       n       &#8211;       &#8211;       local<br />
virtual   unix  &#8211;       n       n       &#8211;       &#8211;       virtual<br />
lmtp      unix  &#8211;       &#8211;       n       &#8211;       &#8211;       lmtp<br />
anvil     unix  &#8211;       &#8211;       n       &#8211;       1       anvil<br />
scache	  unix	-	-	n	-	1	scache</p>
<p>#Maildrop<br />
maildrop  unix  &#8211;       n       n       &#8211;       &#8211;       pipe<br />
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}</p>
<p>old-cyrus unix  &#8211;       n       n       &#8211;       &#8211;       pipe<br />
  flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}</p>
<p>cyrus     unix  &#8211;       n       n       &#8211;       &#8211;       pipe<br />
  user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}</p>
<p>uucp      unix  &#8211;       n       n       &#8211;       &#8211;       pipe<br />
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender &#8211; $nexthop!rmail ($recipient)</p>
<p>ifmail    unix  &#8211;       n       n       &#8211;       &#8211;       pipe<br />
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)<br />
bsmtp     unix  &#8211;       n       n       &#8211;       &#8211;       pipe<br />
  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient</p>
<p>#Mailman<br />
mailman   unix  &#8211;       n       n       &#8211;       &#8211;       pipe<br />
      flags=FR user=mailman:mailman argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Postfix - main.cf]]></title>
<link>http://davidatenney.wordpress.com/2009/11/25/main-cf/</link>
<pubDate>Wed, 25 Nov 2009 02:45:12 +0000</pubDate>
<dc:creator>davidatenney</dc:creator>
<guid>http://davidatenney.wordpress.com/2009/11/25/main-cf/</guid>
<description><![CDATA[queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/libexec/p]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>queue_directory = /var/spool/postfix</p>
<p>command_directory = /usr/sbin</p>
<p>daemon_directory = /usr/libexec/postfix</p>
<p>mail_owner = postfix</p>
<p>inet_interfaces = all</p>
<p>local_transport = maildrop<br />
maildrop_destination_recipient_limit = 1</p>
<p>mydestination = $myhostname, DOMAINNAME.COM</p>
<p>local_recipient_maps = proxy:ldap:/etc/postfix/ldap/local_recipients.cf<br />
virtual_alias_maps = proxy:ldap:/etc/postfix/ldap/virtual_aliases.cf</p>
<p>unknown_local_recipient_reject_code = 550</p>
<p>mynetworks = 127.0.0.0/8 hash:/etc/postfix/network_table</p>
<p>alias_maps = hash:/etc/aliases</p>
<p>alias_database = hash:/etc/aliases</p>
<p>smtpd_sasl_local_domain =<br />
smtpd_sasl_auth_enable = yes<br />
smtpd_sasl_security_options = noanonymous<br />
broken_sasl_auth_clients = yes<br />
smtpd_sasl_authenticated_header = yes</p>
<p>smtpd_tls_auth_only = no<br />
smtpd_use_tls = yes<br />
smtp_tls_note_starttls_offer = yes<br />
smtpd_tls_key_file = /etc/postfix/certs/swmail.DOMAINNAME.COM.key<br />
smtpd_tls_cert_file = /etc/postfix/certs/swmail.DOMAINNAME.COM.crt<br />
smtpd_tls_loglevel = 1<br />
smtpd_tls_received_header = yes<br />
smtpd_tls_session_cache_timeout = 3600s<br />
tls_random_source = dev:/dev/urandom</p>
<p>smtpd_sender_login_maps = ldap:/etc/postfix/ldap/mail_from_login.cf<br />
smtpd_recipient_restrictions = permit_mynetworks reject_authenticated_sender_login_mismatch permit_sasl_authenticated reject_unauth_destination</p>
<p>message_size_limit = 50000000</p>
<p>smtpd_helo_required = yes</p>
<p>sender_canonical_maps = hash:/etc/postfix/sender_canonical</p>
<p>debug_peer_level = 2</p>
<p>debugger_command =<br />
	 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin<br />
	 xxgdb $daemon_directory/$process_name $process_id &#38; sleep 5</p>
<p>sendmail_path = /usr/sbin/sendmail.postfix</p>
<p>newaliases_path = /usr/bin/newaliases.postfix</p>
<p>mailq_path = /usr/bin/mailq.postfix</p>
<p>setgid_group = postdrop</p>
<p>html_directory = no</p>
<p>manpage_directory = /usr/share/man</p>
<p>sample_directory = /usr/share/doc/postfix-2.3.3/samples</p>
<p>readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES</p>
<p>#Mailman<br />
mailman_destination_recipient_limit = 1<br />
relay_domains = lists.DOMAINNAME.COM</p>
<p>#Rename hosts<br />
smtp_generic_maps = hash:/etc/postfix/generic</p>
<p>transport_maps = hash:/etc/postfix/transport</p>
<p>#MailArchiver<br />
#milter_protocol = 2<br />
#milter_default_action = tempfail<br />
#smtpd_milters = inet:IPADDRESS:8092</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[¿Cómo borrar la cola de Postfix?]]></title>
<link>http://johnbarquin.wordpress.com/2009/11/18/%c2%bfcomo-borrar-la-cola-de-postfix/</link>
<pubDate>Wed, 18 Nov 2009 20:31:00 +0000</pubDate>
<dc:creator>johnbarquin</dc:creator>
<guid>http://johnbarquin.wordpress.com/2009/11/18/%c2%bfcomo-borrar-la-cola-de-postfix/</guid>
<description><![CDATA[OJO: aplicar esto solo en caso de extrema gravedad, corrupción de la cola, etc. Se perderán todos lo]]></description>
<content:encoded><![CDATA[OJO: aplicar esto solo en caso de extrema gravedad, corrupción de la cola, etc. Se perderán todos lo]]></content:encoded>
</item>
<item>
<title><![CDATA[Integrando Postfix com Active Directory]]></title>
<link>http://bjuniow.wordpress.com/2009/11/18/integrando-postfix-com-active-directory/</link>
<pubDate>Wed, 18 Nov 2009 12:58:30 +0000</pubDate>
<dc:creator>bjuniow</dc:creator>
<guid>http://bjuniow.wordpress.com/2009/11/18/integrando-postfix-com-active-directory/</guid>
<description><![CDATA[Nos ultimos dias tive que migrar o servidor de email do meu trabalho, de forma que todos os usuários]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Nos ultimos dias tive que migrar o servidor de email do meu trabalho, de forma que todos os usuários se autentiquem com o mesmo usuário e senha do Active Directory,assim centralizando os serviços. Depois de alguns dias de estudos consegui a autenticação. Aqui vou demonstrar apenas uma configuração basica de um servidor de emails autenticando no AD utilizando Postfix com o Dovecot. Toda configuração será usando os Debian como sistema.</p>
<p><strong>Instalando pacotes necessários</strong></p>
<pre>apt-get install postfix postfix-ldap dovecot-common dovecot-imapd dovecot-pop3d</pre>
<p><strong>Crie o usuário vmail</strong></p>
<p>Este usuário é responsavel pela manipulação das contas de emails</p>
<pre>useradd vmail -s /bin/false -d /home/vmail</pre>
<p><strong>Crie o diretório onde ficarão os e-mails dos usuários</strong></p>
<pre>chown -R vmail:vmail /home/vmail
chmod -R 700 /home/vmail</pre>
<p><strong>Configuração do postfix</strong></p>
<p>Cria o arquivos ldap-users.cf com a seguinte conf</p>
<pre>server_host = 10.10.10.1
search_base = dc=intranet,dc=com
version = 3
query_filter = (&#38;(objectclass=person)(samaccountname=%s))
result_attribute = samaccountname
result_format = %u/Maildir/
bind = yes
bind_dn = ldap@intranet.com
bind_pw = senha do usuario ldap</pre>
<p><em>obs:</em> O <em>server_host</em> será o endereço do AD e o <em>search_base</em> será a base de consulta LDAP</p>
<p><em>obs2:</em> Observer que a linha <em>bind_dn =ldap@intranet.com, o ldap é um usuário do AD </em><em></em><em></em></p>
<p>o main.cf com configuração basica:</p>
<pre>smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination =  localhost.localdomain, localhost
home_mailbox = Maildir/
relayhost =
mynetworks = 127.0.0.0/8 ,10.10.10.0/16
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

virtual_mailbox_domains = mail.teste.com
virtual_mailbox_base = /home/vmail/
virtual_mailbox_maps = ldap:/etc/postfix/ldap-users.cf
virtual_uid_maps = static:1001   # Aqui coloca-se o valor do uid do usuario vmail
virtual_gid_maps = static:1001   # Aqui coloca-se o valor do gid do usuario vmail

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions =  permit_mynetworks,
    permit_sasl_authenticated, reject_unauth_destination
broken_sasl_auth_clients = yes</pre>
<p><strong>Configurando dovecot</strong></p>
<p>em /etc/dovecot/dovecot.conf</p>
<pre>protocols = imap imaps pop3 pop3s
log_timestamp = "%Y-%m-%d %H:%M:%S "
  mail_location = maildir:/home/vmail/%u/Maildir/
mail_privileged_group = mail
mail_debug = no
valid_chroot_dirs = /home/vmail
maildir_copy_with_hardlinks = yes
protocol imap {
 mail_plugin_dir = /usr/lib/dovecot/modules/imap
 imap_client_workarounds = delay-newmail outlook-idle netscape-eoh
}

protocol pop3 {
 pop3_uidl_format = %08Xu%08Xv
 mail_plugin_dir = /usr/lib/dovecot/modules/pop3
 pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol managesieve {
 sieve=~/.dovecot.sieve
 sieve_storage=~/sieve
}
auth_username_format = %Lu
auth_debug = no
auth default {
 mechanisms = plain login
 socket listen {
   client {
      path = /var/spool/postfix/private/auth
      mode = 0660
      user = postfix
      group = postfix
   }
 }
 passdb ldap {
   args = /etc/dovecot/dovecot-ldap.conf
 }
 userdb static {
     args = uid=1001 gid=1001 home=/home/vmail/%u
 }
 user = root

  socket listen {
    master {
        path = /var/run/dovecot/auth-master
        mode = 0600
        user = vmail
        group = vmail
    }
    client {
        path = /var/run/dovecot/auth-client
        mode = 0660
        }
    }
}
dict {
}
plugin {
}</pre>
<p>Em dovecot-ldap.conf</p>
<pre>hosts = 10.10.10.1
base = dc=intranet,dc=com
ldap_version = 3
auth_bind = yes
auth_bind_userdn = dominio\%u
</pre>
<p><em>obs:</em> O <em>hosts</em> será o endereço do AD e o <em>base</em> será a base de consulta LDAP</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ubuntu 8.04 Mail Server (Postfix+Dovecot+AD)]]></title>
<link>http://ershovis.wordpress.com/2009/11/16/ubuntu-8-04-mail-server-postfixdovecotad/</link>
<pubDate>Mon, 16 Nov 2009 10:11:30 +0000</pubDate>
<dc:creator>Ozzy</dc:creator>
<guid>http://ershovis.wordpress.com/2009/11/16/ubuntu-8-04-mail-server-postfixdovecotad/</guid>
<description><![CDATA[Ершов Илья Почтовый сервер на Ubuntu 8.04 с авторизацией в Active Directory 16 ноября 2009 Сегодня я]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ершов Илья<br />
<strong><font size="+1">Почтовый сервер на Ubuntu 8.04 с авторизацией в Active Directory</font></strong><br />
<font size="-2">16 ноября 2009</font></p>
<p>Сегодня я напишу о том, как настроить IMAP сервер с авторизацией в Active Directory и шифрованием по TLS.<br />
Настраивать будем связку <strong>Postfix+Dovecot+Active Directory</strong>. Основной идеей решения является то, что адрес электронной почты пользователя хранится в поле mail каждого пользователя Active Directory, желающего иметь почту.</p>
<p><img src="http://ershovis.wordpress.com/files/2009/11/architect.jpg" alt="architect" title="architect" width="600" height="412" class="aligncenter size-full wp-image-81" /></p>
<p>Ставим необходимые пакеты</p>
<p><code>apt-get install postfix postfix-ldap dovecot-common dovecot-imapd</code></p>
<p>В ходе установки отвечаем на следующие вопросы:</p>
<p><code>Create directories for web-based administration? – No<br />
General type of mail configuration – Internet Site<br />
System mail name - fqdn</code></p>
<p><strong>Переходим к настройке Postfix</strong></p>
<p><a href="http://www.postfix.org/">Postfix</a> &#8211; агент передачи почты (Mail Transfer Agent, MTA). Занимается пересылкой почты, пришедшей на порт 25 (SMTP).</p>
<p><code>postconf –e ‘myorigin = MYDOMAIN.ORG’<br />
postconf -e 'virtual_mailbox_domains = /etc/postfix/domains.cf'<br />
postconf -e 'virtual_mailbox_base = /var/mail'<br />
postconf -e 'virtual_mailbox_maps = ldap:/etc/postfix/ldap-users.cf'<br />
postconf -e 'virtual_minimum_uid = 8'<br />
postconf -e 'virtual_uid_maps = static:8'<br />
postconf -e 'virtual_gid_maps = static:8'<br />
postconf -e 'virtual_transport = dovecot'<br />
postconf -e 'dovecot_destination_recipient_limit = 1'<br />
postconf -e 'message_size_limit = 20480000'<br />
postconf -e 'smtpd_sasl_auth_enable = no'<br />
postconf -e 'smtpd_sasl_exceptions_networks = $mynetworks'<br />
postconf -e 'smtpd_sasl_security_options = noanonymous'<br />
postconf -e 'broken_sasl_auth_clients = yes'<br />
postconf -e 'smtpd_sasl_type = dovecot'<br />
postconf -e 'smtpd_sasl_path = private/auth'<br />
postconf -e 'smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination,permit'</code></p>
<p>В нашем случае он будет принимать лишь почту для отдельных доменов (<em>virtual_mailbox_domains</em>) – список этих доменов хранится в виде простого списка <em>/etc/postfix/domains.cf </em></p>
<p><code>mydomain.org</code></p>
<p>Проверка того, существует ли на данном сервере адресат, которому предназначено письмо, осуществляется через LDAP-запросы (<em>virtual_mailbox_maps</em>).<br />
Cодержимое файла <em>/etc/postfix/ldap-users.cf</em></p>
<p><code>version = 3<br />
server_host = IP_адрес_контроллера_домена:3268<br />
query_filter = (&#38;(objectclass=user)(mail=%s))<br />
result_attribute = samaccountname<br />
result_format = %s<br />
bind = yes<br />
bind_dn = MYDOMAIN\логин_пользователя<br />
bind_pw = Пароль_пользователя</code></p>
<p>Разберемся в том, что здесь к чему. В качестве входного параметра выступает строка <em>%s</em>, содержащая адрес электронной почты пользователя. После этого осуществляется LDAP-запрос от имени пользователя <em>MYDOMAIN\логин_пользователя</em>. Производится поиск объекта класса <em>user</em> с адресом <em>%s</em>. Если такой объект (то есть пользователь) найден, то возвращается поле <em>sAMAccountName</em> &#8211; поиск успешен. После этого Postfix считает, что такой пользователь в базе есть, и передает письмо сервису Dovecot (<em>virtual_transport</em>).<br />
Финальный аккорд настройки postfix – прописываем сервис dovecot в файле <em>/etc/postfix/master.cf</em></p>
<p><code>dovecot unix - n n - - pipe<br />
flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -d ${recipient}</code></p>
<p><strong>Переходим к настройке Dovecot</strong></p>
<p><a href="http://dovecot.org/">Dovecot</a> выполняет роли доставщика писем от Postfix в локальные каталоги <em>/var/mail</em>. Вся настройка осуществляется через конфигурационный файл <em>/etc/dovecot/dovecot.conf</em></p>
<p><code>base_dir = /var/run/dovecot/<br />
protocols = imap<br />
disable_plaintext_auth = no<br />
log_timestamp = "%Y-%m-%d %H:%M:%S "<br />
login_greeting = Welcome to IMAP/POP3 server<br />
mail_location = maildir:/var/mail/%d/%n<br />
mail_privileged_group = mail<br />
mail_debug = no<br />
first_valid_uid = 8<br />
last_valid_uid = 8<br />
maildir_copy_with_hardlinks = yes<br />
protocol imap {<br />
	login_executable = /usr/lib/dovecot/imap-login<br />
	mail_executable = /usr/lib/dovecot/imap<br />
	imap_max_line_length = 65536<br />
	mail_plugin_dir = /usr/lib/dovecot/modules/imap<br />
	imap_client_workarounds: outlook-idle outlook-idle netscape-eoh tb-extra-mailbox-sep<br />
}<br />
protocol lda {<br />
	postmaster_address = postmaster@mail.domain.ru<br />
	hostname=mail.domain.ru<br />
	sendmail_path = /usr/lib/sendmail<br />
	auth_socket_path = /var/run/dovecot/auth-master<br />
}<br />
auth_verbose = no<br />
auth_debug = no<br />
auth_debug_passwords = no<br />
auth default {<br />
	mechanisms = plain<br />
   	passdb ldap {<br />
		args = /etc/dovecot/ldap.conf<br />
	}<br />
	userdb static {<br />
		args = uid=8 gid=8 allow_all_users=yes<br />
	}<br />
	user = nobody<br />
	socket listen {<br />
		master {<br />
			path = /var/run/dovecot/auth-master<br />
			mode = 0660<br />
			user = mail<br />
			group = mail<br />
		}<br />
		client {<br />
			path = /var/spool/postfix/private/auth<br />
			mode = 0660<br />
			user = postfix<br />
			group = postfix<br />
		}<br />
	}<br />
}</code></p>
<p>Авторизация происходит через LDAP-запрос. Параметры подключения к LDAP-серверу находятся в файле <em>/etc/dovecot/ldap.conf</em></p>
<p><code>hosts = IP_контроллера_домена:3128<br />
dn = имя_пользователя@MYDOMAIN.ORG<br />
dnpass = пароль_пользователя<br />
auth_bind = yes<br />
ldap_version = 3<br />
base = dc=MYDOMAIN,dc=ORG<br />
deref = never<br />
scope = subtree<br />
default_pass_scheme = CRYPT<br />
pass_filter = (&#38;(objectclass=user)(mail=%n@%d))</code></p>
<p>Источник:<br />
http://rus-linux.net/lib.php?name=/MyLDP/server/kerio2linux.html<br />
https://help.ubuntu.com/community/PostfixDovecotSASL<br />
https://help.ubuntu.com/community/Postfix</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Postfix SMTP Server with SASL]]></title>
<link>http://jasonk2600.wordpress.com/2009/11/10/postfix-smtp-server-with-sasl/</link>
<pubDate>Tue, 10 Nov 2009 22:45:00 +0000</pubDate>
<dc:creator>jasonk2600</dc:creator>
<guid>http://jasonk2600.wordpress.com/2009/11/10/postfix-smtp-server-with-sasl/</guid>
<description><![CDATA[Installation Install Postfix from the ports collection.&#160; Be sure to select the Dovecot SASL opt]]></description>
<content:encoded><![CDATA[Installation Install Postfix from the ports collection.&#160; Be sure to select the Dovecot SASL opt]]></content:encoded>
</item>
<item>
<title><![CDATA[Quickie HowTo &ndash; SMTP Proxy on FreeBSD]]></title>
<link>http://jasonk2600.wordpress.com/2009/11/07/quickie-howto-smtp-proxy-on-freebsd/</link>
<pubDate>Sat, 07 Nov 2009 00:11:00 +0000</pubDate>
<dc:creator>jasonk2600</dc:creator>
<guid>http://jasonk2600.wordpress.com/2009/11/07/quickie-howto-smtp-proxy-on-freebsd/</guid>
<description><![CDATA[Installation Install the Postfix SMTP server from the FreeBSD ports collection. Be sure to enable Po]]></description>
<content:encoded><![CDATA[Installation Install the Postfix SMTP server from the FreeBSD ports collection. Be sure to enable Po]]></content:encoded>
</item>
<item>
<title><![CDATA[[TIP] Loguear postfix en un archivo separado usando syslog-ng]]></title>
<link>http://malditonerd.wordpress.com/2009/11/06/tip-loguear-postfix-en-un-archivo-separado-usando-syslog-ng/</link>
<pubDate>Fri, 06 Nov 2009 16:39:57 +0000</pubDate>
<dc:creator>malditonerd</dc:creator>
<guid>http://malditonerd.wordpress.com/2009/11/06/tip-loguear-postfix-en-un-archivo-separado-usando-syslog-ng/</guid>
<description><![CDATA[Mas que TIP, es una nota mental, ya es la segunda vez que tengo que hacer esto y googlear al respect]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Mas que TIP, es una nota mental, ya es la segunda vez que tengo que hacer esto y googlear al respecto por no acordarme <span style="text-decoration:line-through;">como mierdas se suponde que debe uno hablarle a syslog-ng en su críptico idioma</span> como se hace:</strong></p>
<p>Por defecto postfix escupe todo su log en syslog, por costumbre uso como syslog la aplicación <a title="Página web oficial de syslog-ng" href="http://www.balabit.com/products/syslog_ng/" target="_blank">syslog-ng</a>, <strong>cuando se usa syslog-ng toda la salida de postfix va a parar derecho a /var/log/messages</strong>.</p>
<p>Esto no tiene nada de malo cuando no se trata de monitorear /var/log/messages con frecuencia, pero cuando varias aplicaciones vuelcan toda su salida al mismo lugar y hay que estar pendiente del log en cuestión, el asunto se pone denso. Postfix en su versión menos verborrágica inunda el log con mensajes cuando el servidor SMTP tiene mucho tráfico. Por esto es que me interesaba separar el log de postfix a un archivo aparte.</p>
<p>Por convención usé /var/log/mail.log, syslog-ng deberá volcar en ese archivo toda la salida de postfix.</p>
<h2>Como se hace:</h2>
<p><strong>Editar el archivo /etc/syslog-ng/syslog-ng.conf</strong>, agregar las siguientes líneas:</p>
<blockquote><p>destination mail { file(&#8220;/var/log/mail.log&#8221;); };</p>
<p>filter mail { facility(mail); };</p>
<p>filter notmail { not facility(mail); };</p>
<p>log { source(src); filter(mail); destination(mail); };</p></blockquote>
<p>Y no me pregunten que significa cada cosa ni por qué funciona, por que no tengo ni idea, ni ganas de investigar al respecto, ni tiempo para hacerlo, pero funciona, doy fe.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Postfix &ndash; The Sendmail Replacement]]></title>
<link>http://jasonk2600.wordpress.com/2009/11/05/postfix-the-sendmail-replacement/</link>
<pubDate>Thu, 05 Nov 2009 23:11:00 +0000</pubDate>
<dc:creator>jasonk2600</dc:creator>
<guid>http://jasonk2600.wordpress.com/2009/11/05/postfix-the-sendmail-replacement/</guid>
<description><![CDATA[M. Zahn has written a fantastic white paper on the Postfix SMTP server.&#160; The paper describes in]]></description>
<content:encoded><![CDATA[M. Zahn has written a fantastic white paper on the Postfix SMTP server.&#160; The paper describes in]]></content:encoded>
</item>
<item>
<title><![CDATA[Ubuntu 8.04 Mail Server (Postfix+Courier+MySQL)]]></title>
<link>http://ershovis.wordpress.com/2009/11/05/ubuntu-8-04-mail-server/</link>
<pubDate>Thu, 05 Nov 2009 06:04:23 +0000</pubDate>
<dc:creator>Ozzy</dc:creator>
<guid>http://ershovis.wordpress.com/2009/11/05/ubuntu-8-04-mail-server/</guid>
<description><![CDATA[Ершов Илья Почтовый сервер на Ubuntu 8.04 с авторизацией в MySQL 5 ноября 2009 Настройка почтового с]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ершов Илья<br />
<strong><font size="+1">Почтовый сервер на Ubuntu 8.04 с авторизацией в MySQL</font></strong><br />
<font size="-2">5 ноября 2009</font></p>
<p>Настройка почтового сервера на базе Ubuntu Server 8.04, установленного с компонентами LAMP- и OpenSSH- сервер.<br />
Настройку делаем удаленно по SSH.<br />
Переходим к настройке почтового сервера. Почтовый сервер будем строить на основе postfix. В качестве авторизации будем использовать базу MySQL.<br />
Устанавливаем необходимые пакеты:</p>
<p><code>apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server courier-authdaemon \<br />
courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl \<br />
libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl mailx</code></p>
<p>В ходе установки отвечаем на следующие вопросы:</p>
<p><code>Create directories for web-based administration? – No<br />
General type of mail configuration – Internet Site<br />
System mail name - fqdn</code></p>
<p>Создадим базу данных в MySQL</p>
<p><code>mysqladmin create mail</code></p>
<p>В MySQL создадим пользователя mail_admin и предоставим ему права на базу данных mail.</p>
<p><code>mysql mail<br />
GRANT SELECT, INSERT, UPDATE, DELETE ON mail.* TO 'mail_admin'@'localhost' IDENTIFIED BY 'пароль_пользователя';<br />
GRANT SELECT, INSERT, UPDATE, DELETE ON mail.* TO 'mail_admin'@'localhost.localdomain' IDENTIFIED BY 'пароль_пользователя';<br />
FLUSH PRIVILEGES;</code></p>
<p>В базе данных создадим таблицы <em>domains</em>, <em>forwardings</em>, <em>users</em> и <em>transport</em>.</p>
<p><code>CREATE TABLE domains (domain varchar(50) NOT NULL, PRIMARY KEY (domain) );<br />
CREATE TABLE forwardings (source varchar(80) NOT NULL, destination TEXT NOT NULL, PRIMARY KEY (source) );<br />
CREATE TABLE users (email varchar(80) NOT NULL, password varchar(20) NOT NULL, PRIMARY KEY (email) );<br />
CREATE TABLE transport (domain varchar(128) NOT NULL default '',transport varchar(128) NOT NULL default '',UNIQUE KEY domain (domain));<br />
quit</code></p>
<p>Таблица  <em>domains</em>  будет хранить наименования виртуальных доменов, для которых Postfix будет получать письма. Таблица  <em>forwardings</em>  будет   содержать   псевдонимы   почтовых   ящиков. Таблица  users  будет   содержать   всю  информацию  о     виртуальных   пользователях. Таблица  <em>transport</em>  необязательного характера,  она  для  продвинутых пользователей.  Позволяет перенаправлять почту отдельных пользователей, доменов либо всю почту на другой почтовый сервер.</p>
<p>Проверим, на каком адресе слушает MySQL. Для этого выполним:</p>
<p><code>cat /etc/mysql/my.cnf &#124; grep bind-address</code></p>
<p>Ответ должен быть следующим:</p>
<p><code>bind-address            = 127.0.0.1</code></p>
<p>Создадим 4 файла конфигурации для postfix. В каждом из них убеждаемся, что параметр password задан верно.</p>
<p><code>Файл /etc/postfix/mysql-virtual_domains.cf<br />
-----------------<br />
user = mail_admin<br />
password = пароль_пользователя<br />
dbname = mail<br />
query = SELECT domain AS virtual FROM domains WHERE domain='%s'<br />
hosts = 127.0.0.1<br />
Файл /etc/postfix/mysql-virtual_forwardings.cf<br />
-----------------<br />
user = mail_admin<br />
password = пароль_пользователя<br />
dbname = mail<br />
query = SELECT destination FROM forwardings WHERE source='%s'<br />
hosts = 127.0.0.1<br />
Файл /etc/postfix/mysql-virtual_mailboxes.cf<br />
-----------------<br />
user = mail_admin<br />
password = пароль_пользователя<br />
dbname = mail<br />
query = SELECT CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') FROM users WHERE email='%s'<br />
hosts = 127.0.0.1<br />
Файл /etc/postfix/mysql-virtual_email2email.cf<br />
-----------------<br />
user = mail_admin<br />
password = пароль_пользователя<br />
dbname = mail<br />
query = SELECT email FROM users WHERE email='%s'<br />
hosts = 127.0.0.1<br />
</code></p>
<p>Выставим права и владельца на созданные файлы:</p>
<p><code>chmod 660 /etc/postfix/mysql-virtual_*.cf<br />
chgrp postfix /etc/postfix/mysql-virtual_*.cf</code></p>
<p>Создадим пользователя, от имени которого будет работать наш почтовый сервер. Все виртуальные домены и ящики будут храниться в домашнем каталоге этого пользователя:</p>
<p><code>groupadd -g 5000 vmail<br />
useradd -g vmail -u 5000 vmail -d /home/vmail -m</code></p>
<p>Внесем изменения в конфигурацию postfix. Проверьте параметры, относящиеся к вашему почтовому серверу</p>
<p><code>postconf -e 'myhostname = fqdn_of_your_mail_server'<br />
postconf -e 'mydestination = fqdn_of_your_mail_server, localhost, localhost.localdomain'<br />
postconf -e 'mynetworks = 127.0.0.0/8'<br />
postconf -e 'message_size_limit = 30720000'<br />
postconf -e 'virtual_alias_domains ='<br />
postconf -e 'virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf,mysql:/etc/postfix/mysql-virtual_email2email.cf'<br />
postconf -e 'virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf'<br />
postconf -e 'virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf'<br />
postconf -e 'virtual_mailbox_base = /home/vmail'<br />
postconf -e 'virtual_uid_maps = static:5000'<br />
postconf -e 'virtual_gid_maps = static:5000'<br />
postconf -e 'smtpd_sasl_auth_enable = yes'<br />
postconf -e 'broken_sasl_auth_clients = yes'<br />
postconf -e 'smtpd_sasl_authenticated_header = yes'<br />
postconf -e 'smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,reject_unauth_destination'<br />
postconf -e 'smtpd_use_tls = yes'<br />
postconf -e 'smtpd_tls_cert_file = /etc/postfix/smtpd.cert'<br />
postconf -e 'smtpd_tls_key_file = /etc/postfix/smtpd.key'<br />
postconf -e 'virtual_create_maildirsize = yes'<br />
postconf -e 'virtual_maildir_extended = yes'<br />
postconf -e 'proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps'</code></p>
<p>Создадим сертификат:</p>
<p><code>cd /etc/postfix<br />
openssl req -new -outform PEM -out smtpd.cert -newkey rsa:2048 -nodes -keyout smtpd.key -keyform PEM -days 365 -x509</code></p>
<p>В ходе генерации отвечаем на ряд простых вопросов:</p>
<p><code>Country Name (2 letter code) [AU]:RU<br />
State or Province Name (full name) [Some-State]:NN<br />
Locality Name (eg, city) []:NN<br />
Organization Name (eg, company) [Internet Widgits Pty Ltd]:MyCompany, LLC<br />
Organizational Unit Name (eg, section) []:IT<br />
Common Name (eg, YOUR name) []:server.yourdomain.local<br />
Email Address []:support@yourdomain.local</code></p>
<p>Дадим на него права:</p>
<p><code>chmod o= /etc/postfix/smtpd.key</code></p>
<p>Создадим каталог для saslauthd</p>
<p><code>mkdir -p /var/spool/postfix/var/run/saslauthd</code></p>
<p>Отредактируем файл /etc/default/saslauthd. Изменим параметры START и OPTIONS на следующие:</p>
<p><code>START=yes<br />
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"</code></p>
<p>Создадим файл /etc/pam.d/smtp и вставим в него две строки (измените пароль на свой):</p>
<p><code>auth    required   pam_mysql.so user=mail_admin passwd= пароль_пользователя host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1<br />
account sufficient pam_mysql.so user=mail_admin passwd= пароль_пользователя host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1</code></p>
<p>Создаем файл /etc/postfix/sasl/smtpd.conf  и добавляем в него следующие сотроки:</p>
<p><code>pwcheck_method: saslauthd<br />
mech_list: plain login<br />
allow_plaintext: true<br />
auxprop_plugin: mysql<br />
sql_hostnames: 127.0.0.1<br />
sql_user: mail_admin<br />
sql_passwd: пароль_пользователя<br />
sql_database: mail<br />
sql_select: select password from users where email = '%u'</code></p>
<p>Добавляем пользователя postfix в группу sasl и перезапускаем postfix и saslauthd:</p>
<p><code>adduser postfix sasl<br />
/etc/init.d/postfix restart<br />
/etc/init.d/saslauthd restart</code></p>
<p>Редактируем /etc/courier/authdaemonrc</p>
<p><code>sed --in-place -e 's/authmodulelist="authpam"/authmodulelist="authmysql"/g' /etc/courier/authdaemonrc</code></p>
<p>Сохраняем файл /etc/courier/authmysqlrc. Вместо него создаем вместо него пустой файл:</p>
<p><code>cp /etc/courier/authmysqlrc /etc/courier/authmysqlrc_orig<br />
cat /dev/null &#62; /etc/courier/authmysqlrc</code></p>
<p>Добавляем в созданный файл следующее:</p>
<p><code>MYSQL_SERVER localhost<br />
MYSQL_USERNAME mail_admin<br />
MYSQL_PASSWORD пароль_пользователя<br />
MYSQL_PORT 0<br />
MYSQL_DATABASE mail<br />
MYSQL_USER_TABLE users<br />
MYSQL_CRYPT_PWFIELD password<br />
MYSQL_UID_FIELD 5000<br />
MYSQL_GID_FIELD 5000<br />
MYSQL_LOGIN_FIELD email<br />
MYSQL_HOME_FIELD “/home/vmail”<br />
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')</code></p>
<p>Удаляем оригинальные сертификаты, созданные Courier</p>
<p><code>rm -f /etc/courier/imapd.pem &#38;&#38; rm -f /etc/courier/pop3d.pem</code></p>
<p>В файлах /etc/courier/imapd.cnf и /etc/courier/pop3d.cnf заменяем CN=localhost на CN=полное_доменное_имя_почтового_сервера.<br />
Регенерируем сертификаты и перезапускаем сервисы:</p>
<p><code>cd /etc/courier<br />
mkimapdcert<br />
mkpop3dcert<br />
/etc/init.d/courier-authdaemon restart<br />
/etc/init.d/courier-imap restart<br />
/etc/init.d/courier-imap-ssl restart<br />
/etc/init.d/courier-pop restart<br />
/etc/init.d/courier-pop-ssl restart</code></p>
<p>Редактируем псевдонимы в файле /etc/aliases:</p>
<p><code>postmaster: root<br />
root: postmaster@yourdomain.com</code></p>
<p>Обновляем алиасы и перезапускаем postfix:</p>
<p><code>newaliases<br />
/etc/init.d/postfix restart</code></p>
<p>Проверяем наш smtp сервер:</p>
<p><code>telnet localhost 25</code></p>
<p>Когда подключимся, выполняем:</p>
<p><code>ehlo localhost</code></p>
<p>Если все правильно настроили, вывод будет примерно таким:</p>
<p><code>250-ubuntusrv.zz.local<br />
250-PIPELINING<br />
250-SIZE 30720000<br />
250-VRFY<br />
250-ETRN<br />
250-STARTTLS<br />
250-AUTH LOGIN PLAIN<br />
250-AUTH=LOGIN PLAIN<br />
250-ENHANCEDSTATUSCODES<br />
250-8BITMIME<br />
250 DSN</code></p>
<p>Теперь можно создавать виртуальные домены и пользователей. Для этого заходим в MySQL:</p>
<p><code>mysql mail<br />
INSERT INTO domains (domain) VALUES ('yourdomain.local');<br />
INSERT INTO users (email, password) VALUES ('ozzy@ yourdomain.local ', ENCRYPT('ozzy'));<br />
quit;</code></p>
<p>Для создания почтового ящика отправляем письмо на адрес ozzy@yourdomain.local</p>
<p><code>mailx ozzy@yourdomain.local</code></p>
<p>Сначала вводите тему сообщения, потом тело. Для выхода из редактирования нажимаем Ctrl+D.<br />
Все. Можно настраивать почтовых клиентов.</p>
<p>Источники:<br />
http://library.linode.com/email-guides/postfix/postfix-courier-mysql-ubuntu-8.04-hardy</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Restriction Classes do Postfix]]></title>
<link>http://bigualinux.wordpress.com/2009/10/22/restriction-classes-do-postfix/</link>
<pubDate>Thu, 22 Oct 2009 17:24:34 +0000</pubDate>
<dc:creator>Rafael Guedes</dc:creator>
<guid>http://bigualinux.wordpress.com/2009/10/22/restriction-classes-do-postfix/</guid>
<description><![CDATA[Nesta semana tive a necessidade de estabelecer uma política de acesso à uma lista interna de e-mail,]]></description>
<content:encoded><![CDATA[Nesta semana tive a necessidade de estabelecer uma política de acesso à uma lista interna de e-mail,]]></content:encoded>
</item>
<item>
<title><![CDATA[Optimizadores de motores de búsqueda de sombrero negro.]]></title>
<link>http://malditonerd.wordpress.com/2009/10/21/optimizadores-de-motores-de-busqueda-de-sombrero-negro/</link>
<pubDate>Wed, 21 Oct 2009 04:00:44 +0000</pubDate>
<dc:creator>malditonerd</dc:creator>
<guid>http://malditonerd.wordpress.com/2009/10/21/optimizadores-de-motores-de-busqueda-de-sombrero-negro/</guid>
<description><![CDATA[Dicho así, en castellano suena feo, ¿No? Me refiero a los Black Hat SEO&#8217;s, señores que cobran ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Dicho así, en castellano suena feo, ¿No?</p>
<p>Me refiero a los <strong>Black Hat SEO&#8217;s</strong>, señores que cobran por llevar tráfico a una página web, cueste lo que cueste y que en su afán de ganar un click hacen de todo para figurar dentro de las primeras posiciones en los buscadores&#8230;</p>
<p>Inclusive cuando <strong>la página no tiene para ofrecer absolutamente nada relacionado con lo que en realidad se está buscando</strong><strong> en ese momento</strong>&#8230; Como cuando uno busca tal o cual software, y <strong>para Google es mucho mas relevante Softonic</strong> que la página web oficial del producto en cuestión (<em>Es para sacarse el sombrero, realmente. Yo cuando sea grande quiero ser como los SEO&#8217;s de Softonic</em>).</p>
<p>La cuestión es que buscando información sobre postfix, en la segunda página de Google me encuentro con esto:<img class="aligncenter size-full wp-image-590" title="postfix" src="http://malditonerd.wordpress.com/files/2009/10/postfix.jpeg" alt="postfix" width="600" height="173" /></p>
<h2>Dude, ¿W-T-F?</h2>
<p>¿A quién se le ocurre semejante burrada de Postfix relayhost Free Download?</p>
<p>Corrijanme si me equivoco: Ni hace falta hacer click en el enlace para darse cuenta, ¿<strong>No se supone que buscar tráfico de esta forma no lleva a nada</strong>? ¿<strong>Que pueden obtener además de clicks basura y desperdicio de ancho de banda</strong>?</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Cancellare messaggi di Mailer-Daemon dalla coda del server]]></title>
<link>http://opuntia.biz/2009/10/16/cancellare-messaggi-di-mailer-daemon-dalla-coda-del-server/</link>
<pubDate>Fri, 16 Oct 2009 13:21:36 +0000</pubDate>
<dc:creator>BoB</dc:creator>
<guid>http://opuntia.biz/2009/10/16/cancellare-messaggi-di-mailer-daemon-dalla-coda-del-server/</guid>
<description><![CDATA[mailq | grep MAILER-DAEMON | awk &#8216;{print $1}&#8217; | tr -d &#8216;*&#8217; | postsuper -d -]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>mailq &#124; grep MAILER-DAEMON &#124; awk &#8216;{print $1}&#8217; &#124; tr -d &#8216;*&#8217; &#124; postsuper -d -</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[CentOS 5 at VPS, postfix master.cf no valid IP address found: smtp]]></title>
<link>http://dragkh.wordpress.com/2009/10/12/centos-5-at-vps-postfix-master-cf-no-valid-ip-address-found-smtp/</link>
<pubDate>Mon, 12 Oct 2009 13:03:34 +0000</pubDate>
<dc:creator>dragkh</dc:creator>
<guid>http://dragkh.wordpress.com/2009/10/12/centos-5-at-vps-postfix-master-cf-no-valid-ip-address-found-smtp/</guid>
<description><![CDATA[In short, some of the VPS providers do not let you have eth0 or loopback interfaces. and when you co]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In short,</p>
<p>some of the VPS providers do not let you have eth0 or loopback interfaces.<br />
and when you configure the postfix to send only mode:</p>
<p>root@lb1:[Mon Oct 12 14:53:21]:[/var/adm]$ cat /etc/postfix/main.cf<br />
# CentOS<br />
queue_directory = /var/spool/postfix<br />
command_directory = /usr/sbin<br />
daemon_directory = /usr/libexec/postfix<br />
mail_owner = postfix<br />
myhostname = lb1.cable-extenders.com<br />
mydomain = lb1.cable-extenders.com<br />
myorigin = $mydomain<br />
inet_interfaces = loopback-only<br />
unknown_local_recipient_reject_code = 550<br />
relayhost =<br />
alias_maps = hash:/etc/aliases<br />
alias_database = hash:/etc/aliases<br />
debug_peer_level = 2<br />
debugger_command =<br />
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin<br />
xxgdb $daemon_directory/$process_name $process_id &#38; sleep 5<br />
sendmail_path = /usr/sbin/sendmail.postfix<br />
newaliases_path = /usr/bin/newaliases.postfix<br />
mailq_path = /usr/bin/mailq.postfix<br />
setgid_group = postdrop<br />
html_directory = no<br />
manpage_directory = /usr/share/man<br />
sample_directory = /usr/share/doc/postfix-2.3.3/samples<br />
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES</p>
<p>after service postfix start you got something like this in the log:</p>
<p>root@lb1:[Mon Oct 12 14:55:30]:[/var/adm]$ cat maillog &#124; sed &#8216;1,4!d&#8217;<br />
Oct 11 12:03:42 svac101 postfix/postfix-script: starting the Postfix mail system<br />
Oct 11 12:03:42 svac101 postfix/master[27022]: fatal: /etc/postfix/master.cf: line 18: no valid IP address found: smtp<br />
Oct 11 12:09:26 svac101 postfix/postfix-script: starting the Postfix mail system<br />
Oct 11 12:09:26 svac101 postfix/master[29049]: fatal: /etc/postfix/master.cf: line 2: no valid IP address found: smtp</p>
<p>after some search, i got this post here: http://www.linuxmail.info/postfix-multiple-ip-address-smtp-greeting/</p>
<p>so, the master.cf  looks like :<br />
root@lb1:[Mon Oct 12 14:58:12]:[/var/adm]$ cat /etc/postfix/master.cf<br />
# Slackware<br />
#smtp      inet  n       -       n       -       -       smtpd<br />
217.113.247.122:smtp inet n &#8211; n &#8211; - smtpd -o myhostname=lb1.cable-extenders.com<br />
pickup    fifo  n       -       n       60      1       pickup<br />
cleanup   unix  n       -       n       -       0       cleanup<br />
qmgr      fifo  n       -       n       300     1       qmgr<br />
tlsmgr    unix  -       -       n       1000?   1       tlsmgr<br />
rewrite   unix  -       -       n       -       -       trivial-rewrite<br />
bounce    unix  -       -       n       -       0       bounce<br />
defer     unix  -       -       n       -       0       bounce<br />
trace     unix  -       -       n       -       0       bounce<br />
verify    unix  -       -       n       -       1       verify<br />
flush     unix  n       -       n       1000?   0       flush<br />
proxymap  unix  -       -       n       -       -       proxymap<br />
proxywrite unix -       -       n       -       1       proxymap<br />
smtp      unix  -       -       n       -       -       smtp<br />
relay     unix  -       -       n       -       -       smtp<br />
-o smtp_fallback_relay=<br />
showq     unix  n       -       n       -       -       showq<br />
error     unix  -       -       n       -       -       error<br />
retry     unix  -       -       n       -       -       error<br />
discard   unix  -       -       n       -       -       discard<br />
local     unix  -       n       n       -       -       local<br />
virtual   unix  -       n       n       -       -       virtual<br />
lmtp      unix  -       -       n       -       -       lmtp<br />
anvil     unix  -       -       n       -       1       anvil<br />
scache    unix  -       -       n       -       1       scache<br />
the Slackware header is because i did copy the master.cf from other VPS i have at San Jose and its Slackware .. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
its much better that this CentOS box because I have full control, including eth0, loopback device and iptables  &#8230;<br />
So you comment the line<br />
smtp      inet  n       -       n       -       -       smtpd<br />
and add this one : your_real_IP:smtp inet n &#8211; n &#8211; - smtpd -o myhostname=your_domain_name</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Bio: Wietse Venema]]></title>
<link>http://snnangola.wordpress.com/2009/10/10/bio-wietse-venema/</link>
<pubDate>Sat, 10 Oct 2009 20:46:45 +0000</pubDate>
<dc:creator>snnangola</dc:creator>
<guid>http://snnangola.wordpress.com/2009/10/10/bio-wietse-venema/</guid>
<description><![CDATA[Voltamos mais uma vez com o espaço de biografias que como sabem trará nao só pessoal Angolano mas ta]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:center;"><img class="aligncenter" src="http://www.porcupine.org/wietse/wietse-fisl.jpg" alt="" width="267" height="406" /></p>
<p>Voltamos mais uma vez com o espaço de biografias que como sabem trará nao só pessoal Angolano mas também estrangeiro. O &#8216;visado&#8217; desta vez é Wietse zweitze Venema, que por ser uma figura ilustre é aqui trazida.</p>
<p>Holandês de nacionalidade, Formado em Física pela universidade de Groeningen na Holanda é entretanto na universidade de Eindhoven onde se destaca no departamento de computação e matematica.</p>
<p>Venema como é conhecido fica famoso apôs publicar com <a href="http://en.wikipedia.org/wiki/Dan_Farmer">Dan Farmer</a> o polemico software security administrator tool for analyzing networks (que sinceramente possui iniciais claramente antibiblicas) que mereceu protestos de meio mundo temerosos de que a mesma pudesse ser usada com sucesso para encontrar falhas de segurança em qualquer sistema informatico.</p>
<p>Venema entretanto nao para: Numa altura em que o servidor de email mais usado era o sendmail e também o mais atacado por causa de inumeras falhas de segurança, ele publica um outro servidor baseado no sendmail mas mais seguro, o Postfix largamente mais utilizado que o primeiro.</p>
<p>Venema publica ainda o TCPWrapper outro programa usado mundialmente e depois o Coroner Toolkit novamente com Dan Farmer. Existem <a href="ftp://ftp.porcupine.org/pub/security/index.html">muitas outras ferramentas</a> e papers publicados por Venema que provaram-no com um dos mais proeminentes especialistas de segurança da decada de 90.</p>
<p>Venema hoje trabalha fruto do seu trabalho, na IBM nos Estados Unidos num dos seus centros de pesquisa, anda meio sumido mas aparece sempre em conferencias de software livre.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Postfix nur lokal konfigurieren]]></title>
<link>http://rorschachstagebuch.wordpress.com/2009/10/05/postfix-nur-lokal-konfigurieren/</link>
<pubDate>Mon, 05 Oct 2009 09:49:46 +0000</pubDate>
<dc:creator>Rorschach</dc:creator>
<guid>http://rorschachstagebuch.wordpress.com/2009/10/05/postfix-nur-lokal-konfigurieren/</guid>
<description><![CDATA[Wenn man unter Ubuntu oder Debian Postfix installiert bekommt man von dem Debian-Paket fragen gestel]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Wenn man unter Ubuntu oder Debian Postfix installiert bekommt man von dem Debian-Paket fragen gestellt, welche einem Postfix schonmal einrichten. Da gibt es auch ein <i>local only</i> Profil welches Postfix nur für den lokalen Mailversand einrichtet.<br />
Das ist nützlich um zum Beispiel Meldungen von Cron oder anderen lokalen Daemonen zu erhalten. Bei anderen Distributionen gibt es so eine nützliche Einrichtungshilfe nicht und man muss sich seine Konfiguration selbst zusammenbauen. </p>
<p>So sieht meine Konfiguration (<b>/etc/postfix/main.cf</b>) für Postfix 2.6.5 aus, welche ausschliesslich lokale Mails zustellt und nur vom localhost aus erreichbar ist:</p>
<blockquote><pre>
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
inet_interfaces = localhost
unknown_local_recipient_reject_code = 550
debug_peer_level = 2
debugger_command =
	 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
	 ddd $daemon_directory/$process_name $process_id &#38; sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /etc/postfix/sample
readme_directory = no
</pre>
</blockquote>
<p>Ich hab von der Standardeinstellung eigentlich nur <em>inet_interfaces</em> auf <em>localhost</em> geändert. Ausserdem habe ich in der <b>/etc/aliases</b> einen Eintrag angelegt, damit alle E-Mails von root zu meinem Benutzer weitergeleitet werden:</p>
<blockquote><pre>
$ cat /etc/aliases
root: rorschach</pre>
</blockquote>
<p>Jetzt kann ich mit den allermeisten E-Mail Clienten wie Claws-Mail die E-Mails lokal abrufen.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Struktur Data]]></title>
<link>http://rincikembang.wordpress.com/2009/09/23/struktur-data/</link>
<pubDate>Wed, 23 Sep 2009 20:46:32 +0000</pubDate>
<dc:creator>rincikembang</dc:creator>
<guid>http://rincikembang.wordpress.com/2009/09/23/struktur-data/</guid>
<description><![CDATA[Tujuan Matakuliah ini adalah : 1)Memahami sistem pengorganisasian d data pada memori komputer dan fi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Tujuan Matakuliah ini adalah : 1)Memahami sistem pengorganisasian d data pada memori komputer dan file (berkas) pada media penyimpanan.  2) Mengimplementasikannya dalam program dengan menggunakan salah satu bahasa pemrograman. Untuk materi setiap pertemuan bisa anda download pada file berikut :</p>
<p>1. <a title="Pertemuan 1" href="http://www.ziddu.com/download/6620842/Pertemuan1.ppt.html" target="_blank">Pertemuan Pertama,</a> Penjelasan menganai struktur data serta perbedaan dengan struktur data serta keterkaitan dengan algoritma</p>
<p>2. <a title="Pertemuan 2" href="http://www.ziddu.com/download/6620844/Pertemuan2.ppt.html" target="_blank">Pertemuan Kedua,</a></p>
<p>3. <a title="Pertemuan 3" href="http://www.ziddu.com/download/6620843/Pertemuan3a.ppt.html" target="_blank">Pertemuan Ketiga,</a></p>
<p>4. <a title="penggunaan adt stack" href="http://www.ziddu.com/download/6997972/PenggunaanADTSTACK.ppt.html" target="_blank">Pertemuan Keempat</a></p>
<p>5. <a title="rekursi" href="http://www.ziddu.com/download/6996696/REKURSI.ppt.html" target="_blank">Pertemuan KeLima,</a></p>
<p>6. <a title="Queue" href="http://www.ziddu.com/download/6996843/Queue.ppt.html" target="_blank">Pertemuan Keenam,</a></p>
<p>7. Pertemuan Ketujuah</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Infix To Postfix conversion in python]]></title>
<link>http://ragsagar.wordpress.com/2009/09/22/infix-to-postfix-conversion-in-python/</link>
<pubDate>Tue, 22 Sep 2009 17:04:29 +0000</pubDate>
<dc:creator>Rag Sagar.V രാഗ് സാഗര്‍.വി</dc:creator>
<guid>http://ragsagar.wordpress.com/2009/09/22/infix-to-postfix-conversion-in-python/</guid>
<description><![CDATA[About Infix and Postfix In an expression if the operators are placed between the operands, it is kno]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h3><strong>About Infix and Postfix</strong></h3>
<p>In an expression if the operators are placed between the operands, it is known as infix notation ( eg A+B) . On the other hand if the operators are placed after the operands then the expression is in postfix notation .( eg AB+)</p>
<h4><strong>Infix Notation                            Postfix Notation</strong></h4>
<p><em>(A-C)*B                                                   AC-B*</em></p>
<p><em>A+(B*C)                                                  ABC*+</em></p>
<p><em>(A+B)/(C-D)                                            AB+CD-/</em></p>
<h3><strong>Code</strong></h3>
<pre class="brush: python;">
#!/usr/bin/python
#http://ragsagar.wordpress.com

postfix = []
temp = []
operator = -10
operand = -20
leftparentheses = -30
rightparentheses = -40
empty = -50

def precedence(s):
	if s is '(':
		return 0
	elif s is '+' or '-':
		return 1
	elif s is '*' or '/' or '%':
		return 2
	else:
		return 99 

def typeof(s):
	if s is '(':
		return leftparentheses
	elif s is ')':
		return rightparentheses
	elif s is '+' or s is '-' or s is '*' or s is '%' or s is '/':
		return operator
	elif s is ' ':
		return empty
	else :
		return operand							

infix = raw_input(&#34;Enter the infix notation : &#34;)
for i in infix :
	type = typeof(i)
	if type is leftparentheses :
		temp.append(i)
	elif type is rightparentheses :
		next = temp.pop()
		while next is not '(':
			postfix.append(next)
			next = temp.pop()
	elif type is operand:
		postfix.append(i)
	elif type is operator:
		p = precedence(i)
		while len(temp) is not 0 and p &#60;= precedence(temp[-1]) :
			postfix.append(temp.pop())
		temp.append(i)
	elif type is empty:
		continue 

while len(temp) &#62; 0 :
	postfix.append(temp.pop())

print &#34;It's postfix notation is &#34;,''.join(postfix)		
</pre>
<h3><strong>Code Explanation</strong></h3>
<p>Above code converts infix notation in variable <strong>infix</strong> into postfix notation and stores in <strong>postfix</strong> list. This algorithm makes use of list <strong>temp </strong>to hold operators and left parantheses in the infix notation. The <strong>postfix</strong> list will be constructed from left to right using operands from <strong>infix</strong> and operators which are removed from <strong>temp</strong>.</p>
<div id="attachment_149" class="wp-caption alignnone" style="width: 510px"><a href="http://ragsagar.wordpress.com/files/2009/09/infixterminal1.png"><img src="http://ragsagar.wordpress.com/files/2009/09/infixterminal1.png" alt="output" title="infixterminal1" width="500" height="358" class="size-full wp-image-149" /></a><p class="wp-caption-text">output</p></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[3. Email]]></title>
<link>http://kuechenserver.wordpress.com/?p=29</link>
<pubDate>Sun, 20 Sep 2009 11:21:28 +0000</pubDate>
<dc:creator>Neelix</dc:creator>
<guid>http://kuechenserver.wordpress.com/?p=29</guid>
<description><![CDATA[HOWTO: Email von Diensten versenden lassen Um in Zukunft zum Beispiel meine Festplatten per S.M.A.R.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h2>HOWTO: Email von Diensten versenden lassen<!--more--></h2>
<p>Um in Zukunft zum Beispiel meine Festplatten per S.M.A.R.T. überwachen zu lassen, möchte ich dass mir ein solches Programm auch Emails zuschicken kann. Das habe ich sehr einfach machen können mit der Anleitung aus dem <a href="http://wiki.ubuntuusers.de/" target="_blank">ubuntuusers.de Wiki</a>: <a href="http://wiki.ubuntuusers.de/Postfix?highlight=postfix" target="_blank">http://wiki.ubuntuusers.de/Postfix?highlight=postfix </a></p>
<p>Prinzipiell geht das in Zeiten von Spam folgendermaßen: Lokal nimmt mein Server die Mails entgegen, und versendet sie &#8211; wie ein normales Email-Programm &#8211; über einen externen Server (Sattelite). Dafür muss sich der Server aber auch &#8211; genau wie z.B. Outlook &#8211; an dem entfernten Webmailaccount per SMTP anmelden, benötigt also Zugangsdaten. Als weitere Schwierigkeit muss der Absender immer gleich lauten, da sonst die meisten Email Provider die Annahme verweigern. Egal wer also vom Kuechenserver aus Mails verschicken will, nach Aussen ists immer dieselbe Email Adresse.</p>
<h2>1. Postfix konfigurieren</h2>
<p>Die Neukonfiguration aufrufen per Console:</p>
<div style="margin:5px 20px 20px;">
<div style="margin-bottom:2px;">Code:</div>
<pre style="border:1px inset;overflow:auto;width:640px;height:34px;text-align:left;margin:0;padding:6px;">sudo dpkg-reconfigure postfix</pre>
</div>
<p>Im Konfigurations-Dialog auf Satellite-Funktionalität stellen, dann die admin-Emailadresse (hier kuechenserver@MAILDOMAIN.tld), nochmal MAILDOMAIN.tld, und den Rest durchklicken. Für die zu benutzende Email-Adresse habe ich das Glück, einen externen Rootserver benutzen zu können. Alternativ könnte ein Freemailer wie Web.de oder GMX weiterhelfen&#8230;</p>
<p>Für das Login beim externen SMTP brauchts üblicherweise auch Logindaten. Die speiche ich ge-hashed in einer extra Datei, die aber auf besondere Weise erstellt werden sollte:</p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot-1.jpg" alt="" /></p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot.jpg" alt="" /></p>
<div style="margin:5px 20px 20px;">
<div style="margin-bottom:2px;">Code:</div>
<pre style="border:1px inset;overflow:auto;width:640px;height:34px;text-align:left;margin:0;padding:6px;">sudo touch /etc/postfix/smtp_passwd
sudo gedit /etc/postfix/smtp_passwd</pre>
</div>
<p>Dort hinein kommt etwas wie dieses:</p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot-1.jpg" alt="" /></p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot.jpg" alt="" /></p>
<div style="margin:5px 20px 20px;">
<div style="margin-bottom:2px;">Code:</div>
<pre style="border:1px inset;overflow:auto;width:640px;height:34px;text-align:left;margin:0;padding:6px;">smtp.externerserver.tld username@externerserver.tld:passwort</pre>
</div>
<p>Diese Datei abspeichern, und in eine Postfix-DB überführen mit:</p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot-1.jpg" alt="" /></p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot.jpg" alt="" /></p>
<div style="margin:5px 20px 20px;">
<div style="margin-bottom:2px;">Code:</div>
<pre style="border:1px inset;overflow:auto;width:640px;height:34px;text-align:left;margin:0;padding:6px;">sudo postmap /etc/postfix/smtp_passwd</pre>
</div>
<p>Fast geschafft. Jetzt noch die Config-Datei von Postfix um die Befehle für den SMTP Login erweitern:</p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot-1.jpg" alt="" /></p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot.jpg" alt="" /></p>
<div style="margin:5px 20px 20px;">
<div style="margin-bottom:2px;">Code:</div>
<pre style="border:1px inset;overflow:auto;width:640px;height:34px;text-align:left;margin:0;padding:6px;">sudo gedit /etc/postfix/main.cf</pre>
</div>
<p>Dort folgendes eintragen:</p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot-1.jpg" alt="" /></p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot.jpg" alt="" /></p>
<div style="margin:5px 20px 20px;">
<div style="margin-bottom:2px;">Code:</div>
<pre style="border:1px inset;width:640px;text-align:left;margin:0;padding:6px;">smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noplaintext noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
myhostname = meinservername.irgendwas.local
sender_canonical_maps = hash:/etc/postfix/sender_canonical</pre>
</div>
<h2>4. TLS Verschlüsselung</h2>
<p>Viele externe Hoster verlangen eine Verschlüsselung mit SSL oder TLS. Abgesehen davon ist es immer sinnvoll, seine ausgehenden Zugangsdaten verschlüsselt zu übertragegen. Mein externer Server möchte für SMTP die TLS Verschlüsselung auf Port 587.</p>
<p>Dafür brauche ich zuerst noch Zertifikate (das hier ist quick´n´dirty, in nem späteren Schritt ginge das dann auch für eingehende Mails):</p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot-1.jpg" alt="" /></p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot.jpg" alt="" /></p>
<div style="margin:5px 20px 20px;">
<div style="margin-bottom:2px;">Code:</div>
<pre>cd /etc/postfix
mkdir ssl
touch smtpd.key
chmod 600 smtpd.key
openssl genrsa 1024 &#62; smtpd.key
openssl req -new -key smtpd.key -x509 -days 3650 -out smtpd.crt
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650</pre>
</div>
<p>und weiter mit dem üblichen Restart von Postfix:</p>
<div style="margin:5px 20px 20px;">
<div style="margin-bottom:2px;">Code:</div>
<pre style="border:1px inset;overflow:auto;width:640px;height:34px;text-align:left;margin:0;padding:6px;">sudo /etc/init.d/postfix restart</pre>
</div>
<p>Fast fertig&#8230;  <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<h2>3. Absenderadressen konfigurieren</h2>
<p>Schön wärs, wenn jetzt schon alles laufen würde. Dummerweise wollen diese plöhden Externen Freemail-Anbieter für gewöhnlich eine korrekte Absenderadresse in der Mail, und nicht meinen Linux-Namen. So auch mein Rootserver draußen.</p>
<p>Also noch die folgende Datei erstellen und konfigurieren:</p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot-1.jpg" alt="" /></p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot.jpg" alt="" /></p>
<div style="margin:5px 20px 20px;">
<div style="margin-bottom:2px;">Code:</div>
<pre style="border:1px inset;overflow:auto;width:640px;height:34px;text-align:left;margin:0;padding:6px;">sudo touch /etc/postfix/sender_canonical
sudo gedit /etc/postfix/sender_canonical</pre>
</div>
<p>Folgendes eintragen:</p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot-1.jpg" alt="" /></p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot.jpg" alt="" /></p>
<div style="margin:5px 20px 20px;">
<div style="margin-bottom:2px;">Code:</div>
<pre style="border:1px inset;width:640px;text-align:left;margin:0;padding:6px;">benutzername1 email@externerserver.tld
benutzername2 email@externerserver.tld
www-data email@externerserver.tld
root email@externerserver.tld
postmaster email@externerserver.tld</pre>
</div>
<p>Wieder in eine Postfix-DB überführen &#8230;</p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot-1.jpg" alt="" /></p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot.jpg" alt="" /></p>
<div style="margin:5px 20px 20px;">
<div style="margin-bottom:2px;">Code:</div>
<pre style="border:1px inset;overflow:auto;width:640px;height:34px;text-align:left;margin:0;padding:6px;">sudo postmap /etc/postfix/sender_canonical</pre>
</div>
<p>&#8230; und wieder den üblichen Restart von Postfix:</p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot-1.jpg" alt="" /></p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot.jpg" alt="" /></p>
<div style="margin:5px 20px 20px;">
<div style="margin-bottom:2px;">Code:</div>
<pre style="border:1px inset;overflow:auto;width:640px;height:34px;text-align:left;margin:0;padding:6px;">sudo /etc/init.d/postfix restart</pre>
</div>
<p>Das sollte es jetzt aber gewesen sein.</p>
<h2>4. Test der Mailfunktion</h2>
<p>Für einen Test schicke ich einfach mal eine kleine Mail von der Console aus, so wie das ein Service wohl auch tun würde:</p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot-1.jpg" alt="" /></p>
<p><img src="/Users/fat/AppData/Local/Temp/moz-screenshot.jpg" alt="" /></p>
<div style="margin:5px 20px 20px;">
<div style="margin-bottom:2px;">Code:</div>
<pre style="border:1px inset;overflow:auto;width:640px;height:34px;text-align:left;margin:0;padding:6px;">mail -s Testbetreff eineandere@email.tld</pre>
</div>
<p>In der darauf erscheinenden leeren Zeile den Test der Mail eingeben, und zum Beenden in einer letzten leeren Zeile einen einzelnen Punkt, und nochmal Enter. Er fragt dann noch nach einer CC Adresse, aber die darf leer bleiben.</p>
<p>Und jetzt mal den Posteingang checken, obs geklappt hat&#8230;  <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[membuat mail server dengan postfix]]></title>
<link>http://floodbost.wordpress.com/2009/09/14/membuat-mail-server-dengan-postfix/</link>
<pubDate>Sun, 13 Sep 2009 23:20:40 +0000</pubDate>
<dc:creator>floodbost</dc:creator>
<guid>http://floodbost.wordpress.com/2009/09/14/membuat-mail-server-dengan-postfix/</guid>
<description><![CDATA[IMAP dan POP3  di eksekusi oleh Davecot, dan devcot harus mendukung IMAP edit file dovecot.conf #sud]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>IMAP dan POP3  di eksekusi oleh Davecot, dan devcot harus mendukung IMAP<br />
edit file dovecot.conf</p>
<p><span style="font-family:courier new,courier;">#sudo gedit /etc/dovecot/dovecot.conf</span><br />
dan di dalamnya harus tercantum protocols=imap pop3<br />
restart dovecot <span style="font-family:courier new,courier;">#sudo /etc/init.d/dovecot restart</span><br />
nah untuk SMPT yang diperlukan yang jelas adalah postfix<br />
<span style="font-family:courier new,courier;">#sudo apt-get install postfix</span><br />
jangan lupa pada saat instalasi<br />
- postfix beroperasi sebagai &#8211; internet site<br />
- Fully Qualified Domain Name (FQDN), contoh  server.nama.net</p>
<p>klo mau di relay di jaringan edit file <span style="font-family:courier new,courier;">/etc/postfix/main.cfg</span><br />
apakah ada tercantum sperti ini<br />
inet_interfaces = all<br />
mynetworks = ip-address-LAN/subnet. 192.168.0.0/24</p>
<p>klo ingin di tumpangkan/me-relay mail ke Internet bisa juga di sesuai kan dengan SMPT punya ISP kita<br />
caranya tambahkan<br />
<span style="font-family:courier new,courier;">relayhost=smtp.telkom.net<br />
relayhost=smtp.indosat.net.id<br />
relayhost=smtp.cbn.net.id<br />
##lainnya sesuaikan saja<br />
restart postfix yang ada di /etc/init.d/</span></p>
<p>meng-konekkan apache web server dengan squirremail, yang pasti kopikan saja file apache.conf dari squirremail ke<br />
<span style="font-family:courier new,courier;">/etc/apache2/conf.d<br />
#sudo cp /etc/squirremail/apache.conf /etc/apache2/conf.d/squirremail.config</span></p>
<p>setting domain yang kita pke dengan<br />
<span style="font-family:courier new,courier;">#sudo /usr/bin/squirremail-configure<br />
ktik 2&#8211;&#62;1&#8211;&#62;nama.net&#8211;&#62;R<br />
restart lagi apache nya #sudo /etc/init.d/apache2 restart<br />
untuk melakukan akes ke http://ip-server-kamu/squirremail/</span></p>
<p>pada prinsipnya dari sisi klient local sudah dpt berkiriman email menggunakan apa saja seperti thunderbird/evolution klo dilinux, klient yang windos bisa menggunakan outlook<br />
untuk dapat menerima email dari luar (internet) ke server mail kamu dan sesuai dengan domain yang kamu miliki harus diregister domain kita, ada banyak<br />
registrar domain, yang jelas harus berkoordinasi dengan ISP yang kita gunakan.</p>
<p>untuk di windows ada beberapa aplikasi bisa dipake yang jelas di phptriad terbaru telah cukup lengkap ditambah dengan ftp server, disarankan menggunkan linux untuk akselarasi dan keamanan</p>
<p>step-by-step diatas ideal untuk mail server yang melayani request lumayan banyak, dan membutuhkan mesin server pula perlu ada pertimbangan dari sisi ekonomi dan efektivitas nya, yah ngitung-ngitung lagi</p>
<p>klo menggunakan domain yang kita sewa di penyedia domain hosting, lebih gampang biasa mereka akan data konfigurasi ns.servername, mx record beserta prioritynya</p>
<p>ingin lebih simple lagi googl/apps (sepertinya tidak asing lagi di kalangan penyewa hosting)<br />
bergabung di http://www.google.com/intl/id/apps/business/index.html<br />
di situ ada fasilitas untuk menggunakan space email gmail tapi email kita tetap sesuai dengan domain kita<br />
keuuntungannya adalah space yang dipakai oleh email tidak mempengaruhi space yang ada dihosting kita google yang akan memberikan petunjuk konfigurasi MX RECORD dan prioritynya</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
