HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Question on adding user to user table (http://www.howtoforge.com/forums/showthread.php?t=27717)

satimis 10th October 2008 15:59

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

marpada 10th October 2008 23:47

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

satimis 11th October 2008 02:31

Quote:

Originally Posted by marpada (Post 149555)
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

falko 11th October 2008 18:56

If you want to receive mails for satimis.com, then you must add satimis.com to the mydestination line.

satimis 12th October 2008 10:48

Quote:

Originally Posted by falko (Post 149650)
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

falko 12th October 2008 17:11

Quote:

Originally Posted by satimis (Post 149705)
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 (Post 149705)
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 (Post 149705)
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.


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

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