View Full Version : Virtual postfix sending problem
generalchaos
10th July 2006, 05:26
It seems like when im sending mail out that it is always going to root@localhost.localhost , any ideas why? This is making all of my servers website scripts not be able to mail the users it needs to send mail to.
even if I just type "echo "test" | mail myemail@comcast.net" it sends it to root@localhost.localhost
falko
11th July 2006, 14:21
What's in your mail og when you try to send an email?
What's in /etc/postfix/main.cf (please strip out the comments)?
What's in /etc/aliases?
generalchaos
11th July 2006, 20:12
What's in your mail og when you try to send an email?
Not sure what exactly your asking for here.
What's in /etc/postfix/main.cf (please strip out the comments)?
main.cf is
virtual_mailbox_domains =/etc/postfix/vhosts.txt
virtual_mailbox_base = /var/spool/vmail
virtual_mailbox_maps = hash:/etc/postfix/vmaps.txt
virtual_uid_maps = static:506
virtual_gid_maps = static:507
virtual_alias_maps = hash:/etc/postfix/valias.txt
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
myhostname = localhost
mydomain = $myhostname
myorigin = $myhostname
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
unknown_local_recipient_reject_code = 550
mynetworks_style = host
relayhost = smtp.comcast.net
alias_maps = hash:/etc/aliases, nis:mail.aliases
alias_database = hash:/etc/aliases
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
What's in /etc/aliases?
# General redirections for pseudo accounts.
bin: root
daemon: root
adm: root
lp: root
sync: root
shutdown: root
halt: root
mail: root
news: root
uucp: root
operator: root
games: root
gopher: root
ftp: root
nobody: root
radiusd: root
nut: root
dbus: root
vcsa: root
canna: root
wnn: root
rpm: root
nscd: root
pcap: root
apache: root
webalizer: root
dovecot: root
fax: root
quagga: root
radvd: root
pvm: root
amanda: root
privoxy: root
ident: root
named: root
xfs: root
gdm: root
mailnull: root
postgres: root
sshd: root
smmsp: root
postfix: root
netdump: root
ldap: root
squid: root
ntp: root
mysql: root
desktop: root
rpcuser: root
rpc: root
nfsnobody: root
ingres: root
system: root
toor: root
manager: root
dumper: root
abuse: root
# mailman aliases
mailman: postmaster
mailman-owner: mailman
newsadm: news
newsadmin: news
usenet: news
ftpadm: ftp
ftpadmin: ftp
ftp-adm: ftp
ftp-admin: ftp
www: webmaster
webmaster: root
noc: root
security: root
hostmaster: root
info: postmaster
marketing: postmaster
sales: postmaster
support: postmaster
# trap decode to catch security attacks
decode: root
# Person who should get root's mail
#root: marc
falko
12th July 2006, 14:05
Not sure what exactly your asking for here.The mail log.
# General redirections for pseudo accounts.
bin: root
daemon: root
adm: root
lp: root
sync: root
shutdown: root
halt: root
mail: root
news: root
uucp: root
operator: root
games: root
gopher: root
ftp: root
nobody: root
radiusd: root
nut: root
dbus: root
vcsa: root
canna: root
wnn: root
rpm: root
nscd: root
pcap: root
apache: root
webalizer: root
dovecot: root
fax: root
quagga: root
radvd: root
pvm: root
amanda: root
privoxy: root
ident: root
named: root
xfs: root
gdm: root
mailnull: root
postgres: root
sshd: root
smmsp: root
postfix: root
netdump: root
ldap: root
squid: root
ntp: root
mysql: root
desktop: root
rpcuser: root
rpc: root
nfsnobody: root
ingres: root
system: root
toor: root
manager: root
dumper: root
abuse: root
# mailman aliases
mailman: postmaster
mailman-owner: mailman
newsadm: news
newsadmin: news
usenet: news
ftpadm: ftp
ftpadmin: ftp
ftp-adm: ftp
ftp-admin: ftp
www: webmaster
webmaster: root
noc: root
security: root
hostmaster: root
info: postmaster
marketing: postmaster
sales: postmaster
support: postmaster
# trap decode to catch security attacks
decode: root
# Person who should get root's mail
#root: marcAre you sending emails to any of these users? These mails are all redirected to root because of these entries in /etc/aliases.
generalchaos
12th July 2006, 18:49
heres what my maillog shows when I do something that requires mail being sent.
Jul 12 12:37:36 localhost postfix/pickup[22519]: A945F250326: uid=502 from=<apache>
Jul 12 12:37:36 localhost postfix/cleanup[22559]: A945F250326: message-id=<20060712163736.A945F250326@localhost>
Jul 12 12:37:36 localhost postfix/qmgr[22520]: A945F250326: from=<apache@localhost.localhost>, size=811, nrcpt=1 (queue active)
Jul 12 12:37:37 localhost postfix/smtp[22561]: A945F250326: to=<generalchals@comcast.net>, relay=smtp.comcast.net[216.148.227.147], delay=1, status=bounced (host smtp.comcast.net[216.148.227.147] said: 550 [PERMFAIL] comcast.net requires valid sender domain (in reply to RCPT TO command))
Jul 12 12:37:37 localhost postfix/cleanup[22559]: 37C9B250328: message-id=<20060712163737.37C9B250328@localhost>
Jul 12 12:37:37 localhost postfix/qmgr[22520]: 37C9B250328: from=<>, size=2655, nrcpt=1 (queue active)
Jul 12 12:37:37 localhost postfix/qmgr[22520]: A945F250326: removed
Jul 12 12:37:37 localhost postfix/local[22563]: 37C9B250328: to=<root@localhost.localhost>, orig_to=<apache@localhost.localhost>, relay=local, delay=0, status=sent (delivered to mailbox)
Jul 12 12:37:37 localhost postfix/qmgr[22520]: 37C9B250328: removed
So it looks like either something changed with a comcast setup (even though it always worked before) or its not liking the fact that the email is coming from apache@localhost.localhost ?
generalchaos
12th July 2006, 19:20
After looking around some more and doing a dnsreport, the problem is the "myhostname = localhost" ...I don't know what to do about this though. If I set the hostname to one of my domains, it will send email fine (however the from field is blank in the email)
but I have multiple domains.
falko
13th July 2006, 15:07
You must change
myhostname = localhost in /etc/postfix/main.cf. Use a real domain/FQDN here that's on your server. Restart Postfix afterwards.
generalchaos
13th July 2006, 15:13
well, thats what im doing right now, but im using no-ip for my domains so its not actually on my server.
It works fine if I email from the domain that I wrote in there, but if i use my other sites the emails come from "(unknown)".
falko
14th July 2006, 11:50
You can use one of your no-ip domains for myhostname.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.