LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-12-2005, 06:53 PM   #1
Sern
Member
 
Registered: May 2005
Location: New York
Distribution: Fedora Core 3
Posts: 57

Rep: Reputation: 15
postfix??? with mulitable domains and mulitable users


I have cyrus and sendmail working beautifuly , BUTmy problem is when i have the confDOMAIN_NAME set as 4inthemorning.com and i send an email to bobsferrytales.com i get this

Aug 12 18:44:08 alpha lmtpunix[12869]: duplicate_mark: <0BA4FB9DAFA28D4B94361039C88E47CF863F73@whbmail.dunnpc.com> 4inthemorning.com!user.sern 1123886648 13

Aug 12 18:44:08 alpha sendmail[12873]: j7CMi79g012871: to=<sern@bobsferrytales.com>, delay=00:00:00, xdelay=00:00:00, mailer=cyrusv2d, pri=120637, relay=localhost, dsn=2.0.0, stat=Sent

it sends to sern@4inthemorning.com instead of sern@bobsferrytales.com please does anyone have any ideas why this could be happening??? Please if you do can you let me know i want to make a tutorial of how to do it and thats the only thing i need to figure out

~Thanks in advance

Last edited by Sern; 08-16-2005 at 10:14 AM.
 
Old 08-13-2005, 05:52 PM   #2
aznluvsmc
Member
 
Registered: Aug 2004
Location: Newmarket, Ontario
Distribution: OpenSuse 10.2
Posts: 184

Rep: Reputation: 30
Hi,

You probably need to look into Virtual User tables and multi-domain hosting. The virtusertable feature allows the server to accept mail for say joeblow@4inthemorning.com and then forward it to joeblow@bobsferrytales.com.

Mind you, this works only if joeblow doesn't exist in both domains.
 
Old 08-15-2005, 06:59 AM   #3
Sern
Member
 
Registered: May 2005
Location: New York
Distribution: Fedora Core 3
Posts: 57

Original Poster
Rep: Reputation: 15
Hey thanks for the reply. My problem is i need mail sent to each account sepertatly i don't want the mail to forward at all. So say if i have staff@4inthemorning.com and staff@bobsferrytales.com they are both 2 seperate email accounts not attached in anyway.
 
Old 08-15-2005, 09:35 AM   #4
Sern
Member
 
Registered: May 2005
Location: New York
Distribution: Fedora Core 3
Posts: 57

Original Poster
Rep: Reputation: 15
i should let you know they are not unix users i created the users with cyrus and sasl

I'll pay someone if they figure this out

EDIT MORE INFO

root@alpha [/etc/mail]# sendmail -bvt sern@bobsferrytales.com
sern@bobsferrytales.com... deliverable: mailer cyrusv2d, user sern@4inthemorning.com

i want it so that mail to sern@bobsferrytales is deliverable to sern@bobsferrytales.com and mail to sern@4inthemorning.com is deliverable to sern@4inthemorning.com

i think i has something to do with this line in sendmail.mc

define(`confDOMAIN_NAME', `$m')dnl

Code:
root@alpha [/etc/mail]# sendmail -bvt -d0.3 < /dev/null
Version 8.13.1
 Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
                MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6
                NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF STARTTLS TCPWRAPPERS
                USERDB USE_LDAP_INIT

============ SYSTEM IDENTITY (after readcf) ============
      (short domain name) $w = alpha
  (canonical domain name) $j = $m
         (subdomain name) $m = 4inthemorning.com
              (node name) $k = alpha.4inthemorning.com
========================================================

Last edited by Sern; 08-15-2005 at 10:53 AM.
 
Old 08-15-2005, 12:03 PM   #5
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 32
Sern

If you want to use this line define(`confDOMAIN_NAME', `$m')dnl make it like this
Code:
define(`confDOMAIN_NAME', ` alpha.4inthemorning.com')dnl
Then "# sendmail -bvt -d0.3 < /dev/null" should give you

Code:
root@alpha [/etc/mail]# sendmail -bvt -d0.3 < /dev/null
Version 8.13.1
 Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
                MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6
                NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF STARTTLS TCPWRAPPERS
                USERDB USE_LDAP_INIT

============ SYSTEM IDENTITY (after readcf) ============
      (short domain name) $w = alpha
  (canonical domain name) $j =  alpha.4inthemorning.com
         (subdomain name) $m = 4inthemorning.com
              (node name) $k = alpha
========================================================
Now try adding
4inthemorning.com
bobsferrytales.com

To /etc/mail/local-host-names

Don't forget to make sendmail.cf and restart sendmail

Pete
 
Old 08-15-2005, 12:07 PM   #6
Sern
Member
 
Registered: May 2005
Location: New York
Distribution: Fedora Core 3
Posts: 57

Original Poster
Rep: Reputation: 15
Hey Pete,
Thanks for replying but when i do that it sends to sern@alpha.4inthemorning.com , it sends to what ever domain is speicified in that config line

Code:
  To:      sern@4inthemorning.com
  Subject: test
  Sent:    Mon, 15 Aug 2005 13:05:22 -0400

did not reach the following recipient(s):

sern@alpha.4inthemorning.com on Mon, 15 Aug 2005 13:04:53 -0400
    The e-mail account does not exist at the organization this message
was sent to.  Check the e-mail address, or contact the recipient
directly to find out the correct address.
    < alpha.4inthemorning.com #5.1.1 SMTP; 550-Mailbox unknown.  Either
there is no mailbox associated with this>
 
Old 08-15-2005, 02:31 PM   #7
aznluvsmc
Member
 
Registered: Aug 2004
Location: Newmarket, Ontario
Distribution: OpenSuse 10.2
Posts: 184

Rep: Reputation: 30
I think there's a local-host-name file that defines all the domains the server will serve. If the main.cf file already specifies 4inthemorning.com then you can add the second domain to the local-hostname file.

The synatx is just to put each domain the server will serve for on it's own line. Then restart sendmail and see if that helps.
 
Old 08-15-2005, 06:59 PM   #8
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 32
Sern

I don't quite know why Sendmail is trying to deliver mail as
sern@alpha.4inthemorning.com

You could leave the line "define(`confDOMAIN_NAME', ` alpha.4inthemorning.com')dnl" out of sendmail.mc and see if sendmail can determine it's own name from /etc/hosts, mine does

There is a way to change the senders email address by using a generics-domains table but try the above first

Just for your information my /etc/hosts file reads

Code:
127.0.0.1  server2.mydomain.co.uk  server2   localhost.localdomain
Where
server2 is my machine name
mydomain.co.uk is obviously my domain name
127.0.0.1 and localhost.localdomain are necessary to stop other things complaining

Pete
 
Old 08-16-2005, 06:55 AM   #9
Sern
Member
 
Registered: May 2005
Location: New York
Distribution: Fedora Core 3
Posts: 57

Original Poster
Rep: Reputation: 15
How could i use the generics-domains table??? I've tried everything else already =/
 
Old 08-16-2005, 10:18 AM   #10
Sern
Member
 
Registered: May 2005
Location: New York
Distribution: Fedora Core 3
Posts: 57

Original Poster
Rep: Reputation: 15
I've change it to postfix and it sends amazing but now i can't send anymail out ARRRGG!!!!
heres the error i am getting
Code:
Aug 16 11:12:21 alpha postfix/smtpd[17298]: warning: ool-44c2c353.dyn.optonline.net[68.194.195.83]: SASL LOGIN authentication failed
heres my main.cf
Code:
queue_directory = /var/spool/postfix

command_directory = /usr/sbin

daemon_directory = /usr/libexec/postfix

mail_owner = postfix






inet_interfaces = $myhostname, localhost


mydestination = $myhostname, localhost.$mydomain, localhost


unknown_local_recipient_reject_code = 550














alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases





virtual_transport = cyrus
virtual_mailbox_domains = bobsferrytales.com 4inthemorning.com
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_alias_maps = hash:/etc/postfix/virtual







smtpd_banner = Domians hosted: $virtual_mailbox_domains. ESMTP Welcomes you.



smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = <empty>
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination


debug_peer_level = 2


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

sample_directory = /usr/share/doc/postfix-2.1.5/samples

readme_directory = /usr/share/doc/postfix-2.1.5/README_FILES
 
Old 08-16-2005, 10:50 AM   #11
Sern
Member
 
Registered: May 2005
Location: New York
Distribution: Fedora Core 3
Posts: 57

Original Poster
Rep: Reputation: 15
NVM i figured it out =D! , time to write up a tutorial for it =D
 
Old 12-29-2005, 09:31 AM   #12
Sapient
Member
 
Registered: Oct 2003
Location: San Luis Obispo, CA
Distribution: SuSE
Posts: 196

Rep: Reputation: 30
Quote:
Originally Posted by Sern
NVM i figured it out =D! , time to write up a tutorial for it =D

Could you post the solution?
 
Old 12-29-2005, 10:00 AM   #13
Sern
Member
 
Registered: May 2005
Location: New York
Distribution: Fedora Core 3
Posts: 57

Original Poster
Rep: Reputation: 15
I use postfix with saslauthd and cyrus. If you'd like i'll write up a full tutorial for you/
 
Old 12-29-2005, 10:10 AM   #14
Sapient
Member
 
Registered: Oct 2003
Location: San Luis Obispo, CA
Distribution: SuSE
Posts: 196

Rep: Reputation: 30
Quote:
Originally Posted by Sern
I use postfix with saslauthd and cyrus. If you'd like i'll write up a full tutorial for you/

Sern, thanks for the support. Not sure a tutorial is neccessary, however, I know a few people posting (including myself) who would benefit from it.

Please look through this thread and let me know if you see anything obvious.


http://www.linuxquestions.org/questi...d.php?t=397245


Thanks, been working through this for days now.
 
  


Reply



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
Sendmail with two domains lasantha Linux - Networking 3 11-02-2005 09:39 AM
sendmail with 2 domains dominant Linux - Networking 1 09-03-2005 05:00 AM
Sendmail: How can I avoid some users send mail to outside domains? lordphantom82 Linux - Software 0 11-16-2004 07:23 PM
more domains with sendmail sqn Slackware 0 06-01-2003 04:00 PM
Two domains for sendmail jhildebrand Linux - Software 2 04-26-2003 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:09 AM.

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