View Single Post
  #16  
Old 26th January 2008, 02:02
peacengell peacengell is offline
Member
 
Join Date: Jan 2008
Posts: 37
Thanks: 10
Thanked 2 Times in 2 Posts
Default i redone the process postfix

here is all the comand i use any mistake let me know
thanks help please
server:/# apt-get install postfix libsas12 sasl12-bin libsas12-modules libdb3-util procmail
Reading package lists... Done
Building dependency tree... Done
postfix is already the newest version.
E: Couldn't find package libsas12
server:/# apt-get install libsas12
Reading package lists... Done
Building dependency tree... Done
E: Couldn't find package libsas12
--10:18:36-- http://libsas12/
=> `index.html'
Resolving libsas12... failed: Name or service not known.

FINISHED --10:18:38--
Downloaded: 0 bytes in 0 files
server:/# clear
server:/# dpkg-reconfigure postfix
Stopping Postfix Mail Transport Agent: postfix.
setting synchronous mail queue updates: false
setting myorigin
setting destinations: server.peacengell.org,localhost.peacengell.org,loc alhost.localdomain,localhost
setting relayhost:
setting mynetworks: 127.0.0.0/8
setting mailbox_command
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
setting inet_protocols: all

Postfix is now set up with the changes above. If you need to make changes, edit
/etc/postfix/main.cf (and others) as needed. To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
Stopping Postfix Mail Transport Agent: postfix.
Starting Postfix Mail Transport Agent: postfix.
server:/# clear
server:/#
server:/# postconf -e 'smtpd_sasl_local_domain ='
server:/# postconf -e 'smtpd_sasl_auth_enable = yes'
server:/# postconf -e 'smtpd_sasl_security_options = noanonymous'
server:/# postconf -e 'broken_sasl_auth_clients = yes'
server:/# postconf -e smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination'
>
>
server:/# postconf -e smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination'

>
server:/# postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination'

server:/# postconf -e 'inet_interfaces =all'
server:/# echo 'pwcheck_method: saslauthd' >> /etc/postfix/sasl/smtpd.conf
server:/# echo 'mech_list: plain login' >> /etc/p
pam.conf passwd perl/ ppp/ protocols python2.4/
pam.d/ passwd- postfix/ profile python/
server:/# echo 'mech_list: plain login' >> /etc/postfix/s
sasl/ ssl/
server:/# echo 'mech_list: plain login' >> /etc/postfix/sasl/smtpd.conf
server:/# mkdir /etc/postfix/ssl
mkdir: cannot create directory `/etc/postfix/ssl': File exists
server:/# cd /etc/postfix/s
sasl/ ssl/
server:/# cd /etc/postfix/ssl/
server:/etc/postfix/ssl# openssl genrsa -des3 -rand /etc/hosts -out smtpd.key1024
292 semi-random bytes loaded
Generating RSA private key, 512 bit long modulus
...++++++++++++
................++++++++++++
e is 65537 (0x10001)
Enter pass phrase for smtpd.key1024:
4499:error:28069065:lib(40):UI_set_result:result too small:ui_lib.c:849:You must type in 4 to 8191 characters
Enter pass phrase for smtpd.key1024:
Verifying - Enter pass phrase for smtpd.key1024:
server:/etc/postfix/ssl# chmod 600 smtpd.key
server:/etc/postfix/ssl# openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
Signature ok
subject=/C=IE/ST=dublin/L=dublin/O=learning/OU=peace/CN=peacengell.org/emailAddress=peacengell@gmail.com
Getting Private key
server:/etc/postfix/ssl# openssl rsa -in smtpd.key -out smtp.key.unecrypted
writing RSA key
server:/etc/postfix/ssl# mv -f smtpd.key.unecrypted smtpd.key
mv: cannot stat `smtpd.key.unecrypted': No such file or directory
server:/etc/postfix/ssl# openssl req -new -x509 -extentions v3_ca -keyout cakey.pem -out acert.pem -days 3650
unknown option -extentions
req [options] <infile >outfile
where options are
-inform arg input format - DER or PEM
-outform arg output format - DER or PEM
-in arg input file
-out arg output file
-text text form of request
-pubkey output public key
-noout do not output REQ
-verify verify signature on REQ
-modulus RSA modulus
-nodes don't encrypt the output key
-engine e use engine e, possibly a hardware device
-subject output the request's subject
-passin private key password source
-key file use the private key contained in file
-keyform arg key file format
-keyout arg file to send the key to
-rand file:file:...
load the file (or the files in the directory) into
the random number generator
-newkey rsa:bits generate a new RSA key of 'bits' in size
-newkey dsa:file generate a new DSA key, parameters taken from CA in 'file'
-newkey ec:file generate a new EC key, parameters taken from CA in 'file'
-[digest] Digest to sign with (md5, sha1, md2, mdc2, md4)
-config file request template file.
-subj arg set or modify request subject
-multivalue-rdn enable support for multivalued RDNs
-new new request.
-batch do not ask anything during request generation
-x509 output a x509 structure instead of a cert. req.
-days number of days a certificate generated by -x509 is valid for.
-set_serial serial number to use for a certificate generated by -x509.
-newhdr output "NEW" in the header lines
-asn1-kludge Output the 'request' in a format that is wrong but some CA's
have been reported as requiring
-extensions .. specify certificate extension section (override value in config file)
-reqexts .. specify request extension section (override value in config file)
-utf8 input characters are UTF8 (default ASCII)
-nameopt arg - various certificate name options
-reqopt arg - various request text options

server:/etc/postfix/ssl# postconf -e 'smtpd_tls_auth_only = no'
server:/etc/postfix/ssl# postconf -e 'smtpd_use_tls = yes'
server:/etc/postfix/ssl# postconf -e 'smtpd_use_tls = yes'
server:/etc/postfix/ssl# postconf -e 'smtpd_tls_note_starttls_offer = yes'
server:/etc/postfix/ssl# postconf -e 'smtpd_tls_key_file = /etc/postfic/ssl/smtpd.key'
server:/etc/postfix/ssl# postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt'
server:/etc/postfix/ssl# postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/postfix/ssl/cacert.pem'
server:/etc/postfix/ssl# postconf -e 'smtpd_tls_loglevel = 1'
server:/etc/postfix/ssl# postconf -e 'smtpd_tls_received_header = yes '
server:/etc/postfix/ssl# postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
server:/etc/postfix/ssl# postconf -e 'tls_random_source = dev:/dev/urandom'
server:/etc/postfix/ssl# postconf -e 'myhostname = server.peacengell.org'
server:/etc/postfix/ssl# cat /etc/postfix/ma
main.cf master.cf
server:/etc/postfix/ssl# cat /etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# 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 (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

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfic/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_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.
smtp_host_lookup = dns, native
myhostname = server.peacengell.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = server.peacengell.org,localhost.peacengell.org,loc alhost.localdomain,localhost
relayhost =
mynetworks = 127.0.0.0/8
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_option = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_tls_auth_only = no
smtpd_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/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
smtpd_sasl_security_options = noanonymous
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
server:/etc/postfix/ssl#
server:/etc/postfix/ssl# /etc/init.d/postfix restart
Stopping Postfix Mail Transport Agent: postfix.
Starting Postfix Mail Transport Agent: postfix.
server:/etc/postfix/ssl# mkdir -p /var/spool/postfix/var/run/saslauthd
server:/etc/postfix/ssl# vi /etc/de
debconf.conf debian_version default/ deluser.conf
server:/etc/postfix/ssl# vi /etc/default/s
saslauthd ssh syslogd syslogd.back
server:/etc/postfix/ssl# vi /etc/default/saslauthd
server:/etc/postfix/ssl# /etc/init.d/saslauthd start
server:/etc/postfix/ssl# /etc/init.d/saslauthd restart
Restarting SASL Authentication Daemon: saslauthd.
server:/etc/postfix/ssl# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
ehlo localhost
Reply With Quote