LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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-10-2009, 09:34 AM   #1
caksin
Member
 
Registered: Jul 2008
Location: Ankara, Türkiye
Distribution: Ubuntu, Pardus
Posts: 47

Rep: Reputation: 16
Virtual mail hosting - how to without the /etc/mailname


Hi it's been quite a long time since the last post and i'm the person responsible for the server of company i work for (Wow. We had one of our domains moved to our server for hosting and the mail server part was not so much of a trouble following the guides (set up on Debian Etch). As told in the guides i used /etc/mailname for what's to come after the @ sign but now that i'm supposed to move another domain to the server, i'm kinda in trouble with that domain part after the @ sign without using myorigin=/etc/mailname in the main.cf file in /etc/postfix. I thought i could find this easy with googling but it's been quite sometime now with no results at all. So for the second domain to have its own name for the outgoing mails belonging to that domain, what must i do? I'm using unix accounts as mail owners.
 
Old 08-13-2009, 05:23 AM   #2
caksin
Member
 
Registered: Jul 2008
Location: Ankara, Türkiye
Distribution: Ubuntu, Pardus
Posts: 47

Original Poster
Rep: Reputation: 16
What i tried

Here is my main.cf:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = $myhostname, $mydomain, localhost.localdomain, localhost
mydomain = dom1.com
myhostname = mail.dom1.com
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = dom1.com
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_domains = /etc/postfix/virtual/vhosts
virtual_alias_maps = hash:/etc/postfix/virtual/valias


/etc/mailname:

dom1.com

/etc/postfix/virtual/vhosts:

dom2.org

/etc/postfix/virtual/valias:

dom2.org DOMAIN

name@dom2.org name

i do the postmap /etc/postfix/virtual/valias when if i change smth in there
and i restart postfix anytime i change smth in main.cf

but still mail from dom2.org has name@dom1.com on the sender part when i recieve the mail with my gmail acoount.

Can no1 tell what's wrong?
 
  


Reply

Tags
maincf, postfix, virtual


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
LXer: Virtual Mail And FTP Hosting With iRedMail And Pure-FTPd LXer Syndicated Linux News 0 07-20-2009 04:51 PM
postfix virtual hosting problem - mail for domain.com loops back to myself ddaas Linux - Server 4 12-28-2008 08:50 PM
do I really need virtual hosting if only hosting one site kustomjs Linux - Server 8 05-22-2008 12:17 PM
Problem w/ outgoing mail using Sendmail virtual hosting dairyland Linux - Software 0 03-30-2005 08:33 AM
E-mail virtual hosting question epicserve Linux - Software 0 11-30-2003 05:29 PM


All times are GMT -5. The time now is 01:50 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration