HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   :D All recieved mails goes to the system admin user ??help (http://www.howtoforge.com/forums/showthread.php?t=5810)

Mounir 26th July 2006 15:49

:D All recieved mails goes to the system admin user ??help
 
Hi guys,

All my recieved mail goes to system admin user admin@hostname.mydomain.com

I can send mail from all the mail adresses i made with ISPConfig. but all de mail naar my server goes to admin.

mail.log:
======

Quote:

Jul 26 15:14:35 mail imaplogin: Connection, ip=[::ffff:127.0.0.1]
Jul 26 15:14:35 mail imaplogin: LOGIN, user=postmaster, ip=[::ffff:127.0.0.1], protocol=IMAP
Jul 26 15:14:35 mail imaplogin: LOGOUT, user=postmaster, ip=[::ffff:127.0.0.1], headers=0, body=0, time=0
Jul 26 15:14:47 mail imaplogin: Connection, ip=[::ffff:127.0.0.1]
Jul 26 15:14:47 mail imaplogin: LOGIN, user=postmaster, ip=[::ffff:127.0.0.1], protocol=IMAP
Jul 26 15:14:48 mail postfix/smtpd[12392]: connect from localhost.localdomain[127.0.0.1]
Jul 26 15:14:48 mail postfix/smtpd[12392]: 0C29411395B: client=localhost.localdomain[127.0.0.1]
Jul 26 15:14:48 mail postfix/cleanup[12395]: 0C29411395B: message-id=<60baa63fa08cd5d42598089c0ab5b552@localhost>
Jul 26 15:14:48 mail postfix/qmgr[12389]: 0C29411395B: from=<postmaster@mydomain.com>, size=468, nrcpt=1 (queue active)
Jul 26 15:14:48 mail imaplogin: LOGOUT, user=postmaster, ip=[::ffff:127.0.0.1], headers=0, body=0, time=1
Jul 26 15:14:48 mail postfix/smtpd[12392]: disconnect from localhost.localdomain[127.0.0.1]
Jul 26 15:14:48 mail imaplogin: Connection, ip=[::ffff:127.0.0.1]
Jul 26 15:14:48 mail imaplogin: LOGIN, user=postmaster, ip=[::ffff:127.0.0.1], protocol=IMAP
Jul 26 15:14:48 mail imaplogin: LOGOUT, user=postmaster, ip=[::ffff:127.0.0.1], headers=0, body=0, time=0
Jul 26 15:14:49 mail postfix/smtp[12414]: 0C29411395B: to=<mailuser@gmail.com>, relay=gmail-smtp-in.l.google.com[66.249.93.
27], delay=1, status=sent (250 2.0.0 OK 1153919689 a1si2412683ugf)
Jul 26 15:14:49 mail postfix/qmgr[12389]: 0C29411395B: removed
Jul 26 15:15:37 mail postfix/smtpd[12392]: connect from smtp05.wanadoo.nl[194.134.35.145]
Jul 26 15:15:37 mail postfix/smtpd[12392]: 91B4E11395B: client=smtp05.wanadoo.nl[194.134.35.145]
Jul 26 15:15:37 mail postfix/cleanup[12395]: 91B4E11395B: message-id=<004901c6b0b6$d1a696d0$0a00000a@blabla>
Jul 26 15:15:37 mail postfix/qmgr[12389]: 91B4E11395B: from=<mailuser@gmail.com>, size=4304, nrcpt=1 (queue active)
Jul 26 15:15:37 mail postfix/smtpd[12392]: disconnect from smtp05.wanadoo.nl[194.134.35.145]
Jul 26 15:15:37 mail postfix/local[12437]: 91B4E11395B: to=<admin@mail.mydomain.com>, orig_to=<postmaster@mydomain.com>,
relay=local, delay=0, status=sent (delivered to mailbox)
Jul 26 15:15:37 mail postfix/qmgr[12389]: 91B4E11395B: removed

netstat -tap
=========

Quote:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:imaps *:* LISTEN 1112/couriertcpd
tcp 0 0 *:pop3s *:* LISTEN 1135/couriertcpd
tcp 0 0 localhost.localdo:mysql *:* LISTEN 1198/mysqld
tcp 0 0 *:pop3 *:* LISTEN 1121/couriertcpd
tcp 0 0 *:imap2 *:* LISTEN 1098/couriertcpd
tcp 0 0 *:www *:* LISTEN 1559/apache2
tcp 0 0 *:81 *:* LISTEN 1410/ispconfig_http
tcp 0 0 *:ftp *:* LISTEN 1705/proftpd: (acce
tcp 0 0 virtual-ip1.mydo:domain *:* LISTEN 1688/named
tcp 0 0 mail.mydomain.:domain *:* LISTEN 1688/named
tcp 0 0 localhost.locald:domain *:* LISTEN 1688/named
tcp 0 0 *:ssh *:* LISTEN 1354/sshd
tcp 0 0 *:10008 *:* LISTEN 1718/perl
tcp 0 0 *:smtp *:* LISTEN 12385/master
tcp 0 0 localhost.localdoma:953 *:* LISTEN 1688/named
tcp 0 0 *:https *:* LISTEN 1559/apache2
tcp 0 148 mail.mydomain.com:ssh 10.0.0.10:kpop ESTABLISHED1820/0

Virtusetable:
=========

###################################
#
# ISPConfig virtusertable Configuration File
# Version 1.0
#
###################################
postmaster@www.mydomain.com postmaster
postmaster@mydomain.com postmaster
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####


Hope u can help.
Thanx

till 27th July 2006 08:52

Please have a look here:

http://www.howtoforge.com/faq/index....light=catchall

Mounir 27th July 2006 13:40

Hi,

this is my main.cf

Quote:

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

myhostname = mail.mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.mydomain.com, localhost.mydomain.com, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
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,reject _unauth_destination
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
#home_mailbox = Maildir/
#mailbox_command =

virtual_maps = hash:/etc/postfix/virtusertable

the admin mail adres is the system admin user.
I create postmaster user with ICPConfig. after i create domain with the seem domain name of the system.

It seems wrong i thenk, if i read this:

Quote:

on the shell.

You should never enter a domain that is used for a virtual site on the server as $mydomain in /etc/postfix/main.cf!
1-But evenif i create user with the system, the recievedmail steel goes to admin@mail.mydomain.com

2-I don't see $mydomain in the main.cf ??? help !!:D

Thanx

falko 28th July 2006 13:09

You must have
Code:

mydestination = /etc/postfix/local-host-names
instead of
Code:

mydestination = mail.digitallou.com, localhost.digitallou.com, localhost
in /etc/postfix/main.cf. Please change that and restart Postfix.

Mounir 28th July 2006 14:05

Done
But i get this in mail.log

Quote:

Jul 28 13:59:23 mail postfix/local[4891]: 8108711395B: to=<admin@mail.mydomain.com>, orig_to=<postmaster@mydomain.com>, r
elay=local, delay=0, status=sent (delivered to mailbox)
Jul 28 13:59:23 mail postfix/qmgr[4710]: 8108711395B: removed

Quote:

###################################
#
# ISPConfig local-host-names Configuration File
# Version 1.0
#
###################################
localhost
mail.mydomain.com
localhost.mail.mydomain.com
localhost.mydomain.com
mydomain.com
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
Quote:

I replaced my real domainname with mydomain, evenif it is too late. when i checked the mail.log i found some spamers that tryed to use my server to send there dirty spam.

falko 29th July 2006 12:27

Quote:

Originally Posted by Mounir
Done
But i get this in mail.log

Please check /etc/aliases if you have an alias for postmaster that redirects your mails to admin.

Mounir 29th July 2006 23:55

Quote:

Originally Posted by falko
Please check /etc/aliases if you have an alias for postmaster that redirects your mails to admin.


Right everything goes to root. I didn't mess with the aliases file.!! Do i have to change it manualy?how?
Thanxx!


mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: admin

I just tryed this and after a reboot, my mail still goes to admin.

mailer-daemon: postmaster
postmaster: postmaster
#nobody: root
#hostmaster: root
#usenet: root
#news: root
#webmaster: root
#www: root
#ftp: root
#abuse: root
#noc: root
#security: root
#root: admin

falko 30th July 2006 16:56

Quote:

Originally Posted by Mounir
I just tryed this and after a reboot, my mail still goes to admin.

After you've changed /etc/aliases, you must run the command
Code:

newaliases
on the shell. Also restart Postfix.

Mounir 31st July 2006 12:22

Quote:

Originally Posted by falko
After you've changed /etc/aliases, you must run the command
Code:

newaliases
on the shell. Also restart Postfix.


It works.
I have to ajust the aliases file every time a add a user.

newaliases on the shell and restart postfix.

Thanx man,:D


All times are GMT +2. The time now is 16:36.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.