Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 18th September 2006, 11:14
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,647
Thanks: 794
Thanked 5,003 Times in 3,912 Posts
Default

PLease fix the mydaomain issue first as postfix will not work corrctly until you fix it by adding mydomain.com at the end of the local-host-names file and restart postfix.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Sponsored Links
  #12  
Old 19th September 2006, 01:37
shiidii shiidii is offline
Member
 
Join Date: Jul 2006
Location: Melbourne, Australia
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Edit: Ohh I see, putting mydomain.com at the end of Local-host-names will fix the "loops back to myself" problem, Thanks!

Also :
such a simple error in which I spent a whole week trying to find.

/etc/mailname

the file read:
Code:
OLDSERVERNAME.mydomain.com
instead of the RIGHT name

Last edited by shiidii; 19th September 2006 at 02:15.
Reply With Quote
  #13  
Old 19th September 2006, 02:51
shiidii shiidii is offline
Member
 
Join Date: Jul 2006
Location: Melbourne, Australia
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Adding this to postfix's Main.cf:
virtual_mailbox_base = /var/mail/
Has resulted in success. I can now send mail locally to myself.

But when I try to send with an external address, an instant response email
Code:
<sales@mydomain.com>: unknown user: "sales"


Final-Recipient: rfc822; sales@mydomain.com
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; unknown user: "sales"
This happens with all users I send to.
I added the user "sales" to the system. And now the mail is bounced back with some errors relating to the user configuration.

So.. for some reason postfix is looking for 'sales' instead of 'web1_sales' like it should. But when I send locally, Web1_sales receives emails easily.

Last edited by shiidii; 19th September 2006 at 04:41.
Reply With Quote
  #14  
Old 19th September 2006, 04:48
shiidii shiidii is offline
Member
 
Join Date: Jul 2006
Location: Melbourne, Australia
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok so as it stands, this is main.cf
Code:
myhostname = mailserver.mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = /etc/postfix/local-host-names
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = 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
smtp_tls_note_starttls_offer = yes
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

virtual_mailbox_base = /var/mail/
virtual_alias_maps = hash:/etc/postfix/virtusertable
virtual_maps = hash:/etc/postfix/virtusertable
virtual_mailbox_domains = hash:/etc/postfix/virtusertable
local_recipient_maps = hash:/etc/postfix/virtusertable
All the 'virtual' lines at the end were me just trying to make sure virtusertable is accessed properly.

Ok so this is weird.
My mail will only be received if the username is the same as the mail address.

so for example:
sales@mydomain.com web1_sales
wont accept incoming mail

sales@mydomain.com sales
But this will

Last edited by shiidii; 19th September 2006 at 05:01.
Reply With Quote
  #15  
Old 19th September 2006, 10:10
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,647
Thanks: 794
Thanked 5,003 Times in 3,912 Posts
Default

Hi, Please remove the lines from your main.cf file:

Quote:
virtual_mailbox_base = /var/mail/
virtual_alias_maps = hash:/etc/postfix/virtusertable
virtual_maps = hash:/etc/postfix/virtusertable
virtual_mailbox_domains = hash:/etc/postfix/virtusertable
local_recipient_maps = hash:/etc/postfix/virtusertable

and add these two lines:

Quote:
virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names
ISPConfig does the mail delivery through procmail, if you use a maildir capable pop3 daemon, enable maildir in ISPConfig, otherwise disable the checkbox.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #16  
Old 19th September 2006, 10:49
shiidii shiidii is offline
Member
 
Join Date: Jul 2006
Location: Melbourne, Australia
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi till,
I made the changes, but I still have the same error. It will only accept mail to users of the same email address.

sales@mydomain.com web1_sales isn't accepted, where as
info@mydomain.com info is


I'm using courier, checking and unchecking maildir, with postfix restarts, does nothing.

Last edited by shiidii; 19th September 2006 at 11:01.
Reply With Quote
  #17  
Old 19th September 2006, 14:31
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,703 Times in 2,546 Posts
Default

Quote:
Originally Posted by shiidii
sales@mydomain.com web1_sales isn't accepted, where as
What's in your mail log when this happens? What's in /etc/postfix/virtusertable? What's the output of
Code:
grep web1_sales /etc/passwd
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #18  
Old 19th September 2006, 14:39
shiidii shiidii is offline
Member
 
Join Date: Jul 2006
Location: Melbourne, Australia
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

1. This is the log when I send an email from gmail
Code:
Sep 19 22:31:29 mailserver postfix/smtpd[4900]: connect from py-out-1112.google.com[64.233.166.178]
Sep 19 22:31:30 mailserver postfix/smtpd[4900]: 4561F312996: client=py-out-1112.google.com[64.233.166.178]
Sep 19 22:31:30 mailserver postfix/cleanup[4904]: 4561F312996: message-id=<7c9681600609190537k7e0bcb08ibd810c150fa845ed@mail.gmail.com>
Sep 19 22:31:30 mailserver postfix/qmgr[27502]: 4561F312996: from=<shiidii@gmail.com>, size=1302, nrcpt=1 (queue active)
Sep 19 22:31:30 mailserver postfix/local[4905]: 4561F312996: to=<sales@mydomain.com>, relay=local, delay=1, status=bounced (unknown user: "sales")
Sep 19 22:31:30 mailserver postfix/cleanup[4908]: D67E5312999: message-id=<20060919123130.D67E5312999@mailserver.mydomain.com>
Sep 19 22:31:30 mailserver postfix/qmgr[27502]: D67E5312999: from=<>, size=3029, nrcpt=1 (queue active)
Sep 19 22:31:30 mailserver postfix/qmgr[27502]: 4561F312996: removed
Sep 19 22:31:38 mailserver postfix/smtp[4909]: D67E5312999: to=<shiidii@gmail.com>, relay=gmail-smtp-in.l.google.com[64.233.163.114], delay=8, status=sent (250 2.0.0 OK 1158669452 e1si14471471nzd)
Sep 19 22:31:38 mailserver postfix/qmgr[27502]: D67E5312999: removed
Sep 19 22:32:01 mailserver postfix/smtpd[4900]: disconnect from py-out-1112.google.com[64.233.166.178]
2. Virtusertable
Code:
###################################
#
# ISPConfig virtusertable Configuration File
#         Version 1.0
#
###################################
sales@www.mydomain.com    web1_sales
web1_sales@www.mydomain.com    web1_sales
sales@mailserver.mydomain.com    web1_sales
web1_sales@mailserver.mydomain.com    web1_sales
sales@mydomain.com    web1_sales
web1_sales@mydomain.com    web1_sales
user@www.mydomain.com    web1_user
web1_user@www.mydomain.com    web1_user
user@mailserver.mydomain.com    web1_user
web1_user@mailserver.mydomain.com    web1_user
user@mydomain.com    web1_user
web1_user@mydomain.com    web1_user
user2@www.mydomain.com    web1_user2
web1_user2@www.mydomain.com    web1_user2
user2@mailserver.mydomain.com    web1_user2
web1_user2@mailserver.mydomain.com    web1_user2
user2@mydomain.com    web1_user2
web1_user2@mydomain.com    web1_user2
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
3. the output is this
Code:
web1_sales:x:10019:10001:Sales:/home/www/web1/user/web1_sales:/bin/false
Reply With Quote
  #19  
Old 20th September 2006, 16:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,703 Times in 2,546 Posts
Default

This all looks ok.
Can you replace

Code:
virtual_mailbox_base = /var/mail/
virtual_alias_maps = hash:/etc/postfix/virtusertable
virtual_maps = hash:/etc/postfix/virtusertable
virtual_mailbox_domains = hash:/etc/postfix/virtusertable
local_recipient_maps = hash:/etc/postfix/virtusertable
in /etc/postfix/main.cf

with just

Code:
virtual_maps = hash:/etc/postfix/virtusertable
and restart Postfix?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #20  
Old 21st September 2006, 02:46
shiidii shiidii is offline
Member
 
Join Date: Jul 2006
Location: Melbourne, Australia
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Sorry, same error.
It's weird because when I send locally, from www-data to sales, it's fine. When I send from an external source to sales, it's a no-go.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Statistic not working mzo Installation/Configuration 49 20th April 2011 12:19
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 13:29
php script injections Grizzly General 21 18th July 2006 08:55
configuring IPTABLES firewall adityavpratap HOWTO-Related Questions 9 27th May 2006 21:42
Cannot receive emails skeeta Installation/Configuration 18 22nd April 2006 16:02


All times are GMT +2. The time now is 05:45.


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