LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-06-2007, 12:31 AM   #1
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Rep: Reputation: 30
need help postfix


Hi,
I have installed postfix madriva 2007 Linux 2.6.17-5mdv.
Can anyone pls explain me about the configuration and implementation of postfix ? you can say i am very much new to all about..

i have configured postfix (as guided by howtoforge.com ) and i am able to get telnet localhost 25 repply...
[root@server1 ~]# telnet server1.example.com 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 server1.example.com ESMTP Postfix (2.3.6) (Mandriva Linux)
ehlo server1.example.com
250-server1.example.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.
[root@server1 ~]#
Now i need a user to test the functionality ..so added a user test by entering command #useradd test and #passwd test ...and send a mail using #mail test but i am not able to see it ..actually i am getting like
[root@server1 ~]# cat /var/log/maillog
cat: /var/log/maillog: No such file or directory

what does it mean ?..anyway ..i am too much confused pls tell me how to .
Create accounts/users,and how do i implement it in my local lan (by using outlook or some other program .i know how to configure outlook etc..)
Thanks
 
Old 08-06-2007, 01:47 AM   #2
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: Linuxmint, Slackware
Posts: 356

Rep: Reputation: 34
Mandriva might be using /var/log/mail.log. I'm not so sure so please do check. To see your mail log interactively, use "tail -f /var/log/maillog (or mail.log).

Postfix by default uses the system users or from your /etc/passwd and its mailbox in /var/spool/mail with each user in mbox format. Nowadays, this is not the way we want it and further of course we don't want our mail accounts messed up with our system accounts for ease of management and most of all, security.

For mail accounts and handling of mailboxes (POP3/IMAP), you can use Dovecot or refer to this howto: http://www.postfixvirtual.net. The later uses combinations of Courier, Cyrus-SASL, OpenSSL and MySQL and Amavisd-new, SpamAssassin and ClamAV for SPAM control.

----------
 
Old 08-06-2007, 02:18 AM   #3
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Original Poster
Rep: Reputation: 30
thanks..
i have executed the cmd you told ..but i getting this pls see the log..

[root@server1 mail]# tail -f /var/log/mail.log
tail: cannot open `/var/log/mail.log' for reading: No such file or directory
tail: no files remaining
[root@server1 mail]# tail -f /var/log/maillog
tail: cannot open `/var/log/maillog' for reading: No such file or directory
tail: no files remaining
[root@server1 mail]# ls
errors info warnings
[root@server1 mail]#

so ..whats now..mail folder does not have any file as maillog or mail.log
in /var/log/mailman/ only a single file as error
 
Old 08-06-2007, 02:29 AM   #4
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: Linuxmint, Slackware
Posts: 356

Rep: Reputation: 34
Check your syslog settings:

# grep mail.* /etc/syslog.conf

-----
 
Old 08-06-2007, 03:08 AM   #5
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Original Poster
Rep: Reputation: 30
i am grtting this

[root@server1 ~]# grep mail.* /etc/syslog.conf
# Log anything (except mail) of level info or higher.
*.info;mail.none;;news.none;authpriv.none -/var/log/messages
mail.=debug;mail.=info;mail.=notice -/var/log/mail/info
mail.=warn -/var/log/mail/warnings
mail.err -/var/log/mail/errors
# Save mail and news errors of level err and higher in a
[root@server1 ~]#
 
Old 08-06-2007, 03:29 AM   #6
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: Linuxmint, Slackware
Posts: 356

Rep: Reputation: 34
# ls /var/log/mail

-------
 
Old 08-06-2007, 03:52 AM   #7
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Original Poster
Rep: Reputation: 30
[test@server1 ~]$ ls /var/log/mail
errors info warnings

[root@server1 mail]# cat /var/log/mail/warnings
[root@server1 mail]# cat /var/log/mail/errors
got nothing ..and
[root@server1 mail]# cat /var/log/mail/info
Aug 6 13:14:20 server1 postfix/qmgr[9192]: 261A231001: from=<root@server1.example.com>, size=453, nrcpt=1 (queue active)
Aug 6 13:14:25 server1 postfix/smtp[9205]: 261A231001: to=<test@server1.example.com>, orig_to=<test>, relay=none, delay=5.6, delays=0.11/0.03/5.5/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=server1.example.com type=A: Host not found)
Aug 6 13:14:25 server1 postfix/cleanup[9203]: C3BD831002: message-id=<20070806074425.C3BD831002@server1.example.com>
Aug 6 13:14:25 server1 postfix/qmgr[9192]: C3BD831002: from=<>, size=2421, nrcpt=1 (queue active)
Aug 6 13:14:25 server1 postfix/bounce[9207]: 261A231001: sender non-delivery notification: C3BD831002
Aug 6 13:14:25 server1 postfix/qmgr[9192]: 261A231001: removed
Aug 6 13:14:26 server1 postfix/smtp[9205]: C3BD831002: to=<root@server1.example.com>, relay=none, delay=0.24, delays=0.01/0/0.23/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=server1.example.com type=A: Host not found)
Aug 6 13:14:26 server1 postfix/qmgr[9192]: C3BD831002: removed
Aug 6 13:15:21 server1 postfix/smtpd[9195]: proxymap stream disconnect
Aug 6 13:15:21 server1 postfix/smtpd[9195]: auto_clnt_close: disconnect private/tlsmgr stream
Aug 6 13:15:38 server1 postfix/smtpd[9195]: idle timeout -- exiting
Aug 6 13:15:41 server1 ipop3d[9225]: pop3 service init from 127.0.0.1
Aug 6 13:16:13 server1 ipop3d[9225]: Login user=test host=server1.example.com [127.0.0.1] nmsgs=0/0
Aug 6 13:16:31 server1 ipop3d[9225]: Logout user=test host=server1.example.com [127.0.0.1] nmsgs=0 ndele=0
[root@server1 mail]#

whats now ?..

Last edited by soroccoheaven; 08-06-2007 at 04:19 AM.
 
Old 08-06-2007, 04:29 AM   #8
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: Linuxmint, Slackware
Posts: 356

Rep: Reputation: 34
Please post your main.cf's

mydomain =
myhostname =
mydestination =
local_recipient_maps =
home_mailbox =

also your

/etc/hosts

/etc/resolv.conf

and

/etc/HOSTNAME or /etc/hostname

I saw that you have a running pop3d and you were able to login successfully.

---------
 
Old 08-06-2007, 04:37 AM   #9
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Original Poster
Rep: Reputation: 30
# Please be sure to read the /usr/share/doc/postfix-*/README.MDK file
# to learn about differences from stock postfix to Mandriva package.
# This file contains only the parameters changed from a default install
# see /etc/postfix/main.cf.dist for a commented, fuller version of this file.

# These are changed by postfix install script
readme_directory = /usr/share/doc/postfix-2.3.6/README_FILES
html_directory = /usr/share/doc/postfix-2.3.6/html
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/share/man
daemon_directory = /usr/lib/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
queue_directory = /var/spool/postfix
mail_owner = postfix

# User configurable parameters

inet_interfaces = all
mynetworks_style = host
#delay_warning_time = 4h
mynetworks = 127.0.0.0/8
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandriva Linux)
unknown_local_recipient_reject_code = 450
smtp-filter_destination_concurrency_limit = 2
lmtp-filter_destination_concurrency_limit = 2
recipient_delimiter = +
owner_request_special = no
alias_maps = hash:/etc/postfix/aliases, hash:/var/lib/mailman/data/aliases
sample_directory = /etc/postfix
syslog_name = postfix
global_config_directory = /etc/postfix
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,rejec
t_unauth_destination
mydomain = example.com
myhostname = server1.$mydomain
mydestination = /etc/postfix/local-host-names, localhost.example.com
smtpd_tls_auth_only = no
smtp_use_tls = yes

smtpd_use_tls = yes
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

pop3 ..log

[root@server1 mail]# telnet localhost pop3
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK POP3 server1.example.com 2004.89mdv server ready
user test
+OK User name accepted, password please
pass #password
+OK Mailbox open, 0 messages
quit
+OK Sayonara
Connection closed by foreign host.
[root@server1 mail]#
 
Old 08-06-2007, 04:45 AM   #10
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: Linuxmint, Slackware
Posts: 356

Rep: Reputation: 34
Quote:
mydestination = /etc/postfix/local-host-names, localhost.example.com
What are the contents of /etc/postfix/local-host-names text file?

Show me your /etc/hosts, etc/HOSTNAME or /etc/hostname and /etc/resolv.conf.

Also post the output for this one:

# grep home_mailbox /etc/postfix/main.cf

----------
 
Old 08-06-2007, 04:45 AM   #11
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Original Poster
Rep: Reputation: 30
/etc/hosts

127.0.0.1 localhost.localdomain localhost
192.168.2.2 server1.example.com server1

/etc/resolv.conf

# $Id: resolv.conf,v 1.1 2006/06/02 23:25:57 othauvin Exp $
# Basic resolv.conf

# search domain

# nameserver 127.0.0.1
# nameserver 127.0.0.1
# nameserver 127.0.0.1
nameserver 61.1.96.69
nameserver 61.1.96.71

[root@server1 ~]# hostname
server1.example.com
[root@server1 ~]# hostname -f
server1.example.com
[root@server1 ~]#

/etc/HOSTNAME or ?etc/hostname ..is it ok ??.

see this .
[root@server1 ~]# vi /etc/host
host.conf hosts hosts.allow hosts.deny
only these file are there .
 
Old 08-06-2007, 04:50 AM   #12
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by gani
What are the contents of /etc/postfix/local-host-names text file?

Show me your /etc/hosts, etc/HOSTNAME or /etc/hostname and /etc/resolv.conf.

Also post the output for this one:

# grep home_mailbox /etc/postfix/main.cf

----------
/etc/postfix/local-host-names is an empty file.

[root@server1 ~]# # grep home_mailbox /etc/postfix/main.cf
[root@server1 ~]#

nothing happened .

[root@server1 ~]# hostname
server1.example.com
[root@server1 ~]# hostname -f
server1.example.com
[root@server1 ~]#
[root@server1 ~]# cd /etc/hostname
-bash: cd: /etc/hostname: No such file or directory
[root@server1 ~]#

Last edited by soroccoheaven; 08-06-2007 at 04:54 AM.
 
Old 08-06-2007, 05:17 AM   #13
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: Linuxmint, Slackware
Posts: 356

Rep: Reputation: 34
Change your /etc/hosts to:

127.0.0.1 localhost.example.com localhost
192.168.2.2 server1.example.com server1

/etc/resolv.conf:

lookup file bind
nameserver 61.1.96.69
nameserver 61.1.96.71

You should be able to ping yourself by simply typing:

$ ping server1

Change or add (if not yet present) the following lines in your /etc/posfix/main.cf:

Code:
mydestination = $myhostname, localhost.$mydomain, localhost

local_recipient_maps = unix:passwd.byname $alias_maps $virtual_mailbox_maps

mynetworks = 127.0.0.1/8, 192.168.2.0/24

home_mailbox = Mailbox
# postfix reload

Your user's mailbox should go in /var/spool/mail or in /var/mail. Although in reality, /var/mail is just a symlink of /var/spool/mail. Send test message and telnet to 110/pop3 to check if it has messages.

---------
 
Old 08-06-2007, 05:47 AM   #14
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by gani
Change your /etc/hosts to:

127.0.0.1 localhost.example.com localhost
192.168.2.2 server1.example.com server1

/etc/resolv.conf:

lookup file bind
nameserver 61.1.96.69
nameserver 61.1.96.71

You should be able to ping yourself by simply typing:

$ ping server1

Change or add (if not yet present) the following lines in your /etc/posfix/main.cf:

Code:
mydestination = $myhostname, localhost.$mydomain, localhost

local_recipient_maps = unix:passwd.byname $alias_maps $virtual_mailbox_maps

mynetworks = 127.0.0.1/8, 192.168.2.0/24

home_mailbox = Mailbox
# postfix reload

Your user's mailbox should go in /var/spool/mail or in /var/mail. Although in reality, /var/mail is just a symlink of /var/spool/mail. Send test message and telnet to 110/pop3 to check if it has messages.

---------

Thanks you very much ..gani..

but i am still not able to see the mail ..anyway ..
see the log /var/log/mail.info

Aug 6 15:47:48 server1 postfix/master[12446]: daemon started -- version 2.3.6, configuration /etc/postfix
Aug 6 15:48:20 server1 postfix/pickup[12450]: D9FEA31001: uid=0 from=<root>
Aug 6 15:48:20 server1 postfix/cleanup[12457]: D9FEA31001: message-id=<20070806101820.D9FEA31001@server1.example.com>
Aug 6 15:48:20 server1 postfix/qmgr[12451]: D9FEA31001: from=<root@server1.example.com>, size=453, nrcpt=1 (queue active)
Aug 6 15:48:31 server1 postfix/smtp[12459]: D9FEA31001: to=<test@server1.example.com>, orig_to=<test>, relay=none, delay=11, delays=0.14/0.27/10/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=server1.example.com type=A: Host not found)
Aug 6 15:48:31 server1 postfix/cleanup[12457]: 9B0BC31002: message-id=<20070806101831.9B0BC31002@server1.example.com>
Aug 6 15:48:31 server1 postfix/qmgr[12451]: 9B0BC31002: from=<>, size=2421, nrcpt=1 (queue active)
Aug 6 15:48:31 server1 postfix/bounce[12461]: D9FEA31001: sender non-delivery notification: 9B0BC31002
Aug 6 15:48:31 server1 postfix/qmgr[12451]: D9FEA31001: removed
Aug 6 15:48:31 server1 postfix/smtp[12459]: 9B0BC31002: to=<root@server1.example.com>, relay=none, delay=0.26, delays=0.03/0/0.23/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=server1.example.com type=A: Host not found)
Aug 6 15:48:31 server1 postfix/qmgr[12451]: 9B0BC31002: removed
Aug 6 16:08:17 server1 postfix/postfix-script: refreshing the Postfix mail system
Aug 6 16:08:17 server1 postfix/master[12446]: reload configuration /etc/postfix
Aug 6 16:09:14 server1 postfix/pickup[12678]: 098FD31001: uid=0 from=<root>
Aug 6 16:09:14 server1 postfix/cleanup[12693]: 098FD31001: message-id=<20070806103914.098FD31001@server1.example.com>
Aug 6 16:09:14 server1 postfix/qmgr[12677]: 098FD31001: from=<root@server1.example.com>, size=462, nrcpt=1 (queue active)
Aug 6 16:09:14 server1 postfix/local[12695]: 098FD31001: to=<test@server1.example.com>, orig_to=<test>, relay=local, delay=0.32, delays=0.17/0.11/0/0.03, dsn=2.0.0, status=sent (delivered to mailbox)
Aug 6 16:09:14 server1 postfix/qmgr[12677]: 098FD31001: removed
Aug 6 16:10:40 server1 ipop3d[12707]: pop3 service init from 127.0.0.1
Aug 6 16:10:56 server1 ipop3d[12707]: Login user=test host=localhost.example.com [127.0.0.1] nmsgs=0/0
Aug 6 16:11:12 server1 ipop3d[12707]: Logout user=test host=localhost.example.com [127.0.0.1] nmsgs=0 ndele=0
Aug 6 16:11:33 server1 postfix/postfix-script: stopping the Postfix mail system
Aug 6 16:11:33 server1 postfix/master[12446]: terminating on signal 15
Aug 6 16:11:36 server1 postfix/postfix-script: starting the Postfix mail system
Aug 6 16:11:36 server1 postfix/master[12839]: daemon started -- version 2.3.6, configuration /etc/postfix
[root@server1 ~]#
 
Old 08-06-2007, 06:00 AM   #15
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Original Poster
Rep: Reputation: 30
i have added a new user mailer1 and send a mail using (see the status =sent)
#mail mailer1
now after that the log showing this ..
Aug 6 16:20:30 server1 postfix/pickup[12843]: 352C531001: uid=0 from=<root>
Aug 6 16:20:30 server1 postfix/cleanup[12942]: 352C531001: message-id=<20070806105030.352C531001@server1.example.com>
Aug 6 16:20:30 server1 postfix/qmgr[12844]: 352C531001: from=<root@server1.example.com>, size=470, nrcpt=1 (queue active)
Aug 6 16:20:30 server1 postfix/local[12944]: 352C531001: to=<mailer1@server1.example.com>, orig_to=<mailer1>, relay=local, delay=0.42, delays=0.27/0.14/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Aug 6 16:20:30 server1 postfix/qmgr[12844]: 352C531001: removed


but i am still not able to see the mailbox for mailer1..
i have been loking it as /var/mail and /var/spool ..why this mailbox hasnt been created ..???..

and when i telnet pop3 i got (0) no mail see the log..

[root@server1 mail]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.example.com (127.0.0.1).
Escape character is '^]'.
+OK POP3 localhost.example.com 2004.89mdv server ready
user mailer1
+OK User name accepted, password please
pass #password
+OK Mailbox open, 0 messages
quit
+OK Sayonara
Connection closed by foreign host.
[root@server1 mail]#

pls look in to it ..
if you need more info i will be pleased to provide.

Thank you very much again..you gave me path ..

Last edited by soroccoheaven; 08-06-2007 at 06:04 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix send mail problem(In RH9, kernal 2.4.20, postfix 2.1.5) minor Linux - General 6 09-23-2019 10:09 PM
Postfix error: /usr/lib/postfix/smtpd pid 7529 exit status 1 Chiragrs Linux - Networking 7 05-16-2008 12:42 AM
Postfix - how do hosted domains download their mail from my postfix franschoek Linux - Software 1 04-01-2006 09:41 PM
can't start postfix ./postfix status error jules_fraser Linux - Software 3 12-06-2003 06:33 PM
move postfix mails from server to another postfix server onetwo Linux - Software 2 03-18-2003 02:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration