LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-26-2013, 03:52 AM   #1
Jalalabee
Member
 
Registered: Aug 2003
Distribution: Slackware 10.2
Posts: 102

Rep: Reputation: 15
postfix: virtual alias sends with server's domain


postfix / centos 6.4 64-bit

server@server.com can send and receive mail.

virtual@virtual.com receives mail just dandy and correctly but when sending mail it shows the sender of virtual@server.com.

Where can I start?
 
Old 05-26-2013, 04:18 AM   #2
Air-Global
Member
 
Registered: Dec 2012
Location: The Netherlands
Distribution: Fedora 27 & CentOS 7
Posts: 62

Rep: Reputation: 8
This does it for me every time:
Code:
[root@mail ~]# vi /etc/postfix/virtual

# add at the head
cent@mail.virtual.host userB

[root@mail ~]# postmap /etc/postfix/virtual

[root@mail ~]# /etc/rc.d/init.d/postfix reload
(source: www.server-world.info/en/)

if you did do this step, could you add some configs, (obscure the names of course) would make it easier to look for a solution
 
Old 05-26-2013, 04:52 AM   #3
Jalalabee
Member
 
Registered: Aug 2003
Distribution: Slackware 10.2
Posts: 102

Original Poster
Rep: Reputation: 15
I gave that a go, no dice.

One thing I'm very unsure about are these default values: mynetworks 168.100.189.0/28, 127.0.0.0/8

From Webmin panel:

Quote:
main.cf


non-default parameters

alias_maps hash:/etc/aliases
home_mailbox Maildir/
inet_protocols all
mailq_path /usr/bin/mailq.postfix
manpage_directory /usr/share/man
mydestination $myhostname, localhost.$mydomain, localhost, $mydomain,
mydomain SERVERDOMAIN.com
mynetworks 168.100.189.0/28, 127.0.0.0/8
mynetworks_style host
newaliases_path /usr/bin/newaliases.postfix
readme_directory /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory /usr/share/doc/postfix-2.6.6/samples
sendmail_path /usr/sbin/sendmail.postfix
virtual_alias_domains VIRTUALDOMAIN.com
virtual_alias_maps hash:/etc/postfix/virtual

main.cf


parameters defined as per defaults

alias_database hash:/etc/aliases
command_directory /usr/sbin
config_directory /etc/postfix
daemon_directory /usr/libexec/postfix
data_directory /var/lib/postfix
debug_peer_level 2
html_directory no
inet_interfaces all
mail_owner postfix
myorigin $myhostname
queue_directory /var/spool/postfix
setgid_group postdrop
unknown_local_recipient_reject_code 550
If there is anything more specific I can grab, I can do.

I did attach the html for the webmin log which includes the above plus a table at the bottom I couldn't reproduce fast enough/readable enough.
Attached Files
File Type: txt 05262013191900.txt (11.4 KB, 21 views)
 
Old 05-26-2013, 10:17 AM   #4
Air-Global
Member
 
Registered: Dec 2012
Location: The Netherlands
Distribution: Fedora 27 & CentOS 7
Posts: 62

Rep: Reputation: 8
I can not tell you if this solves anything, but I have always added my virtual hosts to the "my destination" in main.cf (im doing this out of the top of my head, its been a long time since i setted Postfix up from scratch)

Code:
mydestination $myhostname, localhost.$mydomain, localhost, $mydomain, $myVirtualDomain
 
Old 05-26-2013, 11:38 PM   #5
Jalalabee
Member
 
Registered: Aug 2003
Distribution: Slackware 10.2
Posts: 102

Original Poster
Rep: Reputation: 15
No dice.

I explicitly hardwired in the main.cf:

myhostname = virtual.com
mydomain = virtual.com
myorigin = virtual.com
mydestination = virtual.com, www.virtual.com
relay_domains = virtual.com

Still sends, still shows the server's hostname.

Back to basics, where would I assign 'user' to 'virtual.com' rather than 'server.com'?

Should I just wipe and try a tutorial? And if so, does this look good: http://www.howtoforge.com/virtual-us...tos-6.3-x86_64
 
Old 05-29-2013, 08:08 AM   #6
Air-Global
Member
 
Registered: Dec 2012
Location: The Netherlands
Distribution: Fedora 27 & CentOS 7
Posts: 62

Rep: Reputation: 8
As far as i used my virtual hosts to send from, i never ever had to assign them. All users just got a second email box.
Then i configure my email client and all works well.
The virtual users are to forward email from one virtual user to a real system users mailbox.

That tutorial looks good if you want to wipe. Personally if i need a tutorial i use the ones from http://www.server-world.info/en/ They offer one for most distributions and keep it simple to do and understand why.
 
  


Reply

Tags
centos6 mumble rpm, postfix, virtual host



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 virtual alias for second domain not mapping correctly gr33d Linux - Software 4 06-29-2010 09:20 AM
Postfix - sends from wrong domain jax8 Linux - Server 1 11-29-2009 09:55 AM
[SOLVED] POSTFIX - virtual domain and alias maps results in 'unknown user' brenton.williams Linux - Server 2 08-19-2009 12:32 AM
Postfix sends mail with wrong origin domain ivanatora Linux - Software 5 05-25-2009 05:12 AM
Mysql - Postfix alias domain paulten Linux - Networking 0 11-03-2003 04:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:44 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