Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th October 2008, 15:59
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default Question on adding user to user table

Hi folks,


Virtual MailBox
Postfix
MySQL
Courier


mysql> show tables;
Code:
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| columns_priv              |
| db                        |
| func                      |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| host                      |
| proc                      |
| procs_priv                |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
17 rows in set (0.00 sec)

mysql> select user,host from user;
Code:
+------------------+-----------------------+
| user             | host                  |
+------------------+-----------------------+
| debian-sys-maint | localhost             |
| mail_admin       | localhost             |
| root             | localhost             |
| mail_admin       | localhost.localdomain |
| root             | xen6.satimis.com      |
+------------------+-----------------------+
5 rows in set (0.00 sec)

To add user 'satimis' to user table, whether run following commands;


mysql -u root -p

GRANT SELECT, INSERT, UPDATE, DELETE ON mail.* TO
'satimis'@'satimis.com' IDENTIFIED BY 'satimis_password';
GRANT SELECT, INSERT, UPDATE, DELETE ON mail.* TO 'satimis'@'localhost'
IDENTIFIED BY 'satimis_password';
GRANT SELECT, INSERT, UPDATE, DELETE ON mail.* TO
'satimis'@'localhost.localdomain' IDENTIFIED BY 'satimis_password';
FLUSH PRIVILEGES;


# grep mydestination /etc/postfix/main.cf
Code:
mydestination = xen6.satimis.com, localhost, localhost.localdomain

Do I need to add "satimis.com" on the line?

TIA


B.R.
satimis
Reply With Quote
Sponsored Links
  #2  
Old 10th October 2008, 23:47
marpada marpada is offline
Senior Member
 
Join Date: Sep 2008
Posts: 139
Thanks: 2
Thanked 14 Times in 14 Posts
Default

Can you tell us what are you trying to do? Is xen6.satimis.com your actual domain, a domain for which you want to receive mail?
________
Colorado Marijuana Dispensary
________
Kids avandia

Last edited by marpada; 13th May 2011 at 01:47.
Reply With Quote
  #3  
Old 11th October 2008, 02:31
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by marpada View Post
Can you tell us what are you trying to do? Is xen6.satimis.com your actual domain, a domain for which you want to receive mail?
Hi marpada,


satimis.com is domain. xen6.satimis.com is hostname. Thanks


satimis
Reply With Quote
  #4  
Old 11th October 2008, 18:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,714 Times in 2,556 Posts
Default

If you want to receive mails for satimis.com, then you must add satimis.com to the mydestination line.
__________________
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
  #5  
Old 12th October 2008, 10:48
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by falko View Post
If you want to receive mails for satimis.com, then you must add satimis.com to the mydestination line.
Hi falko,


I'm running virtual domain here. Adding satimis.com to mydestination did not help. I tried. The mail server can neither send nor receive mails. Performed following test;


1)
telnet localhost 25
Code:
.....
RCPT TO: satimis@yahoo.com
451 4.3.0 <satimis@yahoo.com>: Temporary lookup failure
...

# tail /var/log/mail.log
Code:
Oct 12 08:30:39 xen6 postfix/cleanup[1655]: 2D6803D810: message-id=<20081012083039.2D6803D810@xen6.satimis.com>
Oct 12 08:30:39 xen6 postfix/proxymap[1656]: warning: mysql query failed: Unknown column 'destination' in 'field list'
Oct 12 08:30:39 xen6 postfix/cleanup[1655]: warning: 2D6803D810: virtual_alias_maps map lookup problem for postmaster@satimis.com
Oct 12 08:31:39 xen6 postfix/pickup[1653]: 2D6853D810: uid=0 from=<root>
Oct 12 08:31:39 xen6 postfix/cleanup[1655]: 2D6853D810: message-id=<20081012083139.2D6853D810@xen6.satimis.com>
Oct 12 08:31:39 xen6 postfix/cleanup[1655]: warning: 2D6853D810: virtual_alias_maps map lookup problem for postmaster@satimis.com
Oct 12 08:32:39 xen6 postfix/pickup[1653]: 4842B3D810: uid=0 from=<root>
Oct 12 08:32:39 xen6 postfix/cleanup[1655]: 4842B3D810: message-id=<20081012083239.4842B3D810@xen6.satimis.com>
Oct 12 08:32:39 xen6 postfix/proxymap[1656]: warning: mysql query failed: Unknown column 'destination' in 'field list'
Oct 12 08:32:39 xen6 postfix/cleanup[1655]: warning: 4842B3D810: virtual_alias_maps map lookup problem for postmaster@satimis.com

# postconf -n
Code:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = xen6.satimis.com, satimis.com, localhost, localhost.localdomain
myhostname = xen6.satimis.com
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
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_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_create_maildirsize = yes
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
virtual_uid_maps = static:5000

2)
Send a mail to satimis@satimis.com


Mail can't arrive.


# tail /var/log/mail.log
Code:
Oct 12 08:35:39 xen6 postfix/cleanup[1655]: warning: 4842F3D810: virtual_alias_maps map lookup problem for postmaster@satimis.com
Oct 12 08:36:22 xen6 postfix/smtpd[1661]: connect from ti-out-0910.google.com[209.85.142.189]
Oct 12 08:36:22 xen6 postfix/trivial-rewrite[1657]: warning: do not list domain satimis.com in BOTH mydestination and virtual_mailbox_domains
Oct 12 08:36:22 xen6 postfix/proxymap[1656]: warning: mysql query failed: Unknown column 'destination' in 'field list'
Oct 12 08:36:22 xen6 postfix/smtpd[1661]: NOQUEUE: reject: RCPT from ti-out-0910.google.com[209.85.142.189]: 451 4.3.0 <satimis@satimis.com>: Temporary lookup failure; from=<satimisliu@gmail.com> to=<satimis@satimis.com> proto=ESMTP helo=<ti-out-0910.google.com>
Oct 12 08:36:22 xen6 postfix/cleanup[1655]: warning: CB03B3D810: virtual_alias_maps map lookup problem for postmaster@xen6.satimis.com
Oct 12 08:36:22 xen6 postfix/smtpd[1661]: disconnect from ti-out-0910.google.com[209.85.142.189]
Oct 12 08:36:39 xen6 postfix/pickup[1653]: C9A593D810: uid=0 from=<root>
Oct 12 08:36:39 xen6 postfix/cleanup[1655]: C9A593D810: message-id=<20081012083639.C9A593D810@xen6.satimis.com>
Oct 12 08:36:39 xen6 postfix/cleanup[1655]: warning: C9A593D810: virtual_alias_maps map lookup problem for postmaster@satimis.com

Edit:

# postmap -q postmaster@satimis.com mysql:/etc/postfix/mysql-virtual_mailboxes.cf
No printout

# postmap -q satimis@satimis.com mysql:/etc/postfix/mysql-virtual_mailboxes.cf
Code:
satimis.com/satimis/


satimis

Last edited by satimis; 12th October 2008 at 11:07.
Reply With Quote
  #6  
Old 12th October 2008, 17:11
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,714 Times in 2,556 Posts
 
Default

Quote:
Originally Posted by satimis View Post
I'm running virtual domain here.
In this case satimis.com must be in the domains table only, but not in mydestination.

Quote:
Originally Posted by satimis View Post
1)
telnet localhost 25
Code:
.....
RCPT TO: satimis@yahoo.com
451 4.3.0 <satimis@yahoo.com>: Temporary lookup failure
...
What's in /etc/resolv.conf?


Quote:
Originally Posted by satimis View Post
Oct 12 08:32:39 xen6 postfix/proxymap[1656]: warning: mysql query failed: Unknown column 'destination' in 'field list'
Please make sure that the MySQL queries are correct in your Postfix configuration and that the table structure is correct.
__________________
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
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
Ruby / FastCGI Problem Chad Server Operation 1 8th March 2008 20:38
Strato Server - Restoring with SystemImager popper2001 HOWTO-Related Questions 5 28th July 2007 10:18
log files cruz Technical 3 15th May 2007 14:35
Creating image with Systemimager cuongtim HOWTO-Related Questions 3 18th November 2006 13:55


All times are GMT +2. The time now is 02:07.


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