![]() |
Steps to activate and postfix to work and sends and receives emails - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: System Setup & Installation (/forum-32.html) +--- Thread: Steps to activate and postfix to work and sends and receives emails (/thread-9283.html) |
Steps to activate and postfix to work and sends and receives emails - ferasfm - 01-20-2010 08:03 AM I love the script is a very excellent after the script's make no mail is not working> e properties that will explain it to meet everything I love e> a script too postfix=postfix=postfix=postfix=postfix= Commentary is very easy steps After you finish downloading the script working following steps will work efficiently mail ========== my sestem is ububntu 8.10 ispCP Omega 1.0.3-1 P-IIII RAM-1G HD-160 G ![]() ![]() --------- ![]() You must ensure that isp omega and installed successfully ============= dpkg-reconfigure postfix ======== Again, you'll be asked some questions: General type of mail configuration: <-- Internet Site System mail name: <-- server.example.com Root and postmaster mail recipient: <-- [blank] Other destinations to accept mail for (blank for none): <-- server.example.com, localhost.example.com, localhost.localdomain, localhost Force synchronous updates on mail queue? <-- No Local networks: <-- 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 Use procmail for local delivery? <-- Yes Mailbox size limit (bytes): <-- 0 Local address extension character: <-- + Internet protocols to use: <-- all ========= Next, do this: postconf -e 'smtpd_sasl_local_domain =' postconf -e 'smtpd_sasl_auth_enable = yes' postconf -e 'smtpd_sasl_security_options = noanonymous' postconf -e 'broken_sasl_auth_clients = yes' postconf -e 'smtpd_sasl_authenticated_header = yes' postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination' postconf -e 'inet_interfaces = all' echo 'pwcheck_method: saslauthd' >> /etc/postfix/sasl/smtpd.conf echo 'mech_list: plain login' >> /etc/postfix/sasl/smtpd.conf ================ Afterwards we create the certificates for TLS: mkdir /etc/postfix/ssl cd /etc/postfix/ssl/ openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024 ============ chmod 600 smtpd.key openssl req -new -key smtpd.key -out smtpd.csr =========== openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt ============== openssl rsa -in smtpd.key -out smtpd.key.unencrypted =========== mv -f smtpd.key.unencrypted smtpd.key openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650 ========= Next we configure Postfix for TLS (make sure that you use the correct hostname for myhostname): postconf -e 'myhostname = server.example.com' ============= postconf -e 'smtpd_tls_auth_only = no' postconf -e 'smtp_use_tls = yes' postconf -e 'smtpd_use_tls = yes' postconf -e 'smtp_tls_note_starttls_offer = yes' postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key' postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt' postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem' postconf -e 'smtpd_tls_loglevel = 1' postconf -e 'smtpd_tls_received_header = yes' postconf -e 'smtpd_tls_session_cache_timeout = 3600s' postconf -e 'tls_random_source = dev:/dev/urandom' ============= The file /etc/postfix/main.cf should now look like this: cat /etc/postfix/main.cf ============= # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. #myorigin = /etc/mailname smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) 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/postfix/ssl/smtpd.crt smtpd_tls_key_file = /etc/postfix/ssl/smtpd.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. myhostname = server.example.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = server.example.com, localhost.example.com, localhost.localdomain, localhost relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all smtpd_sasl_local_domain = smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_sasl_authenticated_header = yes smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination smtpd_tls_auth_only = no smtp_use_tls = yes smtp_tls_note_starttls_offer = yes 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 Authentication will be done by saslauthd. We have to change a few things to make it work properly. Because Postfix runs chrooted in /var/spool/postfix we have to do the following: ================= mkdir -p /var/spool/postfix/var/run/saslauthd ============ Now we have to edit /etc/default/saslauthd in order to activate saslauthd. Set START to yes and change the line OPTIONS="-c -m /var/run/saslauthd" to OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r": vi /etc/default/saslauthd ============ # # Settings for saslauthd daemon # Please read /usr/share/doc/sasl2-bin/README.Debian for details. # # Should saslauthd run automatically on startup? (default: no) START=yes # Description of this saslauthd instance. Recommended. # (suggestion: SASL Authentication Daemon) DESC="SASL Authentication Daemon" # Short name of this saslauthd instance. Strongly recommended. # (suggestion: saslauthd) NAME="saslauthd" # Which authentication mechanisms should saslauthd use? (default: pam) # # Available options in this Debian package: # getpwent -- use the getpwent() library function # kerberos5 -- use Kerberos 5 # pam -- use PAM # rimap -- use a remote IMAP server # shadow -- use the local shadow password file # sasldb -- use the local sasldb database file # ldap -- use LDAP (configuration is in /etc/saslauthd.conf) # # Only one option may be used at a time. See the saslauthd man page # for more information. # # Example: MECHANISMS="pam" MECHANISMS="pam" # Additional options for this mechanism. (default: none) # See the saslauthd man page for information about mech-specific options. MECH_OPTIONS="" # How many saslauthd processes should we run? (default: 5) # A value of 0 will fork a new process for each connection. THREADS=5 # Other options (default: -c -m /var/run/saslauthd) # Note: You MUST specify the -m option or saslauthd won't run! # # WARNING: DO NOT SPECIFY THE -d OPTION. # The -d option will cause saslauthd to run in the foreground instead of as # a daemon. This will PREVENT YOUR SYSTEM FROM BOOTING PROPERLY. If you wish # to run saslauthd in debug mode, please run it by hand to be safe. # # See /usr/share/doc/sasl2-bin/README.Debian for Debian-specific information. # See the saslauthd man page and the output of 'saslauthd -h' for general # information about these options. # # Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd" #OPTIONS="-c -m /var/run/saslauthd" OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r" ================= Next add the postfix user to the sasl group (this makes sure that Postfix has the permission to access saslauthd): adduser postfix sasl ================== Now restart Postfix and start saslauthd: /etc/init.d/postfix restart /etc/init.d/saslauthd start ===================== To see if SMTP-AUTH and TLS work properly now run the following command: telnet localhost 25 After you have established the connection to your Postfix mail server type ehlo localhost If you see the lines 250-STARTTLS and 250-AUTH PLAIN LOGIN everything is fine. The output on my system looks like this: root@server:/etc/postfix/ssl# telnet localhost 25 Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. 220 server.example.com ESMTP Postfix (Ubuntu) ehlo localhost 250-server.example.com 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN quit 221 2.0.0 Bye Connection closed by foreign host. root@server:/etc/postfix/ssl# Type quit ======== reboot ========== Sent to any email I tried to hotmail and gmail and proved that I received the email and sent to all Besatp is pleased Thank you to all the people> yen develop ispomega from ferasfm = palestaine RE: Steps to activate and postfix to work and sends and receives emails - kilburn - 01-20-2010 10:48 AM Sorry but... WTF? RE: Steps to activate and postfix to work and sends and receives emails - ferasfm - 01-22-2010 09:04 PM what you men ??? Sorry but... WTF RE: Steps to activate and postfix to work and sends and receives emails - kilburn - 01-22-2010 09:25 PM WTF? = What The Fuck? = I don't understand what is your post about. Are you trying to provide a "how to something"? Are you asking a question? Do you expect replies from other users? I simply don't understand it... RE: Steps to activate and postfix to work and sends and receives emails - ferasfm - 01-22-2010 10:12 PM انتا واحد منيك في العربي وشخص حقير RE: Steps to activate and postfix to work and sends and receives emails - kilburn - 01-22-2010 11:22 PM Oh! Now it's crystal clear hehe RE: Steps to activate and postfix to work and sends and receives emails - rbtux - 01-23-2010 02:26 AM common kilburn... Someone stole your crystal ball? Or what is the problem here ;-))) RE: Steps to activate and postfix to work and sends and receives emails - karpik - 08-11-2012 09:14 PM Hi, I did everything described here and now smpt keeps asking for password and emails won't send. |