ďťż
 
 
   instalacja i konfiguracja postfixa
 
 

Tematy

 
    
 

 

 

 

instalacja i konfiguracja postfixa





miras_w - 28-08-2007 19:11
Sorki jestem młodym userem debiana i chciałbym postawic sobie serwer poczty. Niestety szukam juz cały dzień i nie moge znaleść opisu instalacji i konfiguracji postfixa. Nie mam juz siły jeśli macie jakieś linki najlepiej w ojczystym języku prosiłbym.
Pozdrawiam:)



Rad - 28-08-2007 19:24
http://howtoforge.com/virtual_users_...ix_debian_etch

Po polsku to nie wiem. Na google sobie znajdź.



miras_w - 28-08-2007 21:11
Zrobiłem według twojego opisu ale mam problem nie moge sie połączyc z skrzynka urzutkownika.

logi :

Aug 28 21:09:01 maksior CRON[4391]: pam_unix(cron:session): session closed for user root
Aug 28 21:09:58 maksior postfix/pickup[4022]: A8C7D1B889: uid=0 from=<root>
Aug 28 21:09:58 maksior postfix/cleanup[4381]: warning: A8C7D1B889: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 21:09:58 maksior postfix/pickup[4022]: A94D91B889: uid=0 from=<root>
Aug 28 21:09:58 maksior postfix/cleanup[4029]: warning: A94D91B889: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 21:09:58 maksior postfix/pickup[4022]: A9E221B889: uid=0 from=<root>
Aug 28 21:09:58 maksior postfix/cleanup[4381]: warning: A9E221B889: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 21:10:01 maksior CRON[4799]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 28 21:10:01 maksior /USR/SBIN/CRON[4800]: (root) CMD (root /etc/init.d/UPGRADE.MONITOR)
Aug 28 21:10:01 maksior postfix/pickup[4022]: 9A9091B88A: uid=0 from=<root>
Aug 28 21:10:01 maksior mysqld[20989]: refused connect from 127.0.0.1
Aug 28 21:10:01 maksior postfix/proxymap[4380]: warning: connect to mysql server 127.0.0.1: Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Aug 28 21:10:01 maksior postfix/cleanup[4029]: warning: 9A9091B88A: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 21:10:01 maksior postfix/pickup[4022]: 9B52F1B88A: uid=0 from=<root>
Aug 28 21:10:01 maksior postfix/cleanup[4381]: warning: 9B52F1B88A: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 21:10:01 maksior postfix/pickup[4022]: 9B9E41B88A: uid=0 from=<root>
Aug 28 21:10:01 maksior postfix/cleanup[4029]: warning: 9B9E41B88A: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 21:10:01 maksior postfix/pickup[4022]: 9C02D1B88A: uid=0 from=<root>



ShinnRa - 28-08-2007 21:59

Aug 28 21:10:01 maksior mysqld[20989]: refused connect from 127.0.0.1 Tu masz "psa pogrzebanego". MySQL zabrania połączeń na adres 127.0.0.1 zezwala tylko na localhost.

Sprawdź czy w /etc/mysql/my.cnf masz taką linijkę odkomentowaną (bez # na początku linii)

bind-address            = 127.0.0.1 jeśli nie to ją dodaj (odkomentuj) i potem

/etc/init.d/mysql restart i nie powinno być już z tym problemów



miras_w - 28-08-2007 22:17
jest odchaszowana :( moze jeszcze troche logów

Aug 28 22:17:39 maksior postfix/pickup[26774]: 3F33C1B88F: uid=0 from=<root>
Aug 28 22:17:39 maksior postfix/cleanup[26776]: warning: 3F33C1B88F: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 22:17:39 maksior postfix/pickup[26774]: 3FCE41B88F: uid=0 from=<root>
Aug 28 22:17:39 maksior postfix/cleanup[26776]: warning: 3FCE41B88F: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 22:17:39 maksior postfix/pickup[26774]: 404B11B88F: uid=0 from=<root>
Aug 28 22:17:39 maksior postfix/cleanup[26776]: warning: 404B11B88F: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 22:17:39 maksior postfix/pickup[26774]: 40B871B88F: uid=0 from=<root>
Aug 28 22:17:39 maksior postfix/cleanup[26776]: warning: 40B871B88F: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 22:17:39 maksior postfix/pickup[26774]: 414B31B88F: uid=0 from=<root>
Aug 28 22:17:39 maksior postfix/cleanup[26776]: warning: 414B31B88F: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 22:17:39 maksior postfix/pickup[26774]: 41BB81B88F: uid=0 from=<root>
Aug 28 22:17:39 maksior postfix/cleanup[26776]: warning: 41BB81B88F: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 22:17:39 maksior postfix/pickup[26774]: 425A51B88F: uid=0 from=<root>
Aug 28 22:17:39 maksior postfix/cleanup[26776]: warning: 425A51B88F: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 22:17:39 maksior postfix/pickup[26774]: 42C681B88F: uid=0 from=<root>
Aug 28 22:17:39 maksior postfix/cleanup[26776]: warning: 42C681B88F: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 22:17:39 maksior postfix/pickup[26774]: 434341B88F: uid=0 from=<root>
Aug 28 22:17:39 maksior postfix/cleanup[26776]: warning: 434341B88F: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 28 22:17:39 maksior postfix/pickup[26774]: 43AF21B88F: uid=0 from=<root>
Aug 28 22:17:39 maksior postfix/cleanup[26776]: warning: 43AF21B88F: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu



ShinnRa - 29-08-2007 12:46
zobacz czy w /etc/aliases masz

root: <user> gdzie <user> to nazwa usera, który ma dostawac maile od roota u mnie to wygląda tak:

postmaster: postmaster@ayanami.eu
root: postmaster



miras_w - 29-08-2007 14:37
u mnie ten plik wyglada tak :

# /etc/aliases
mailer-daemon: postmaster
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
postmaster: postmaster@maksior.zadupie.eu.tld
root: postmaster [ Dodano: 2007-08-29, 15:31 ]
Rozumiem ze tutaj hodzi o alians w pliku /etc/aliases
Aug 29 14:54:17 maksior postfix/cleanup[3518]: warning: 4D3851B8E6: virtual_alias_maps map lookup problem for root@maksior.zadupie.eu
Aug 29 14:54:18 maksior postfix/pickup[31988]: 4D3931B8E6: uid=0 from=<root> Ale jeszcze inny problem. Przy skonfigurowaniu klienta pocztowego i uruchomieniu takie logi
Aug 29 14:54:02 maksior courierpop3login: Connection, ip=[::ffff:127.0.0.1]
Aug 29 14:54:15 maksior authdaemond: failed to connect to mysql server (server=localhost, userid=mail_admin ): Access denied for user 'mail_admin '@'localhost' (using password: YES)
Aug 29 14:54:15 maksior courierpop3login: LOGIN FAILED, user=miras, ip=[::ffff:127.0.0.1]
Aug 29 14:54:15 maksior courierpop3login: authentication error: Input/output error nieiwem co nie tak moze pokarze ze isynieje baza
mysql> show databases;
+--------------------+
| Database          |
+--------------------+
| information_schema |
| mail              |
| mysql            |
+--------------------+
5 rows in set (0.00 sec)

mysql> USE mail;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+----------------+
| Tables_in_mail |
+----------------+
| domains        |
| forwardings    |
| transport      |
| users          |
+----------------+
4 rows in set (0.00 sec) baze stworzyłem skryptem :
more baza.mail
GRANT SELECT, INSERT, UPDATE, DELETE ON mail.* TO 'mail_admin'@'localhost' IDENTIFIED BY 'haslo';
GRANT SELECT, INSERT, UPDATE, DELETE ON mail.* TO 'mail_admin'@'localhost.localdomain' IDENTIFIED BY 'haslo';
FLUSH PRIVILEGES;

USE mail;
CREATE TABLE domains (
domain varchar(50) NOT NULL,
PRIMARY KEY (domain) )
TYPE=MyISAM;

CREATE TABLE forwardings (
source varchar(80) NOT NULL,
destination TEXT NOT NULL,
PRIMARY KEY (source) )
TYPE=MyISAM;

CREATE TABLE users (
email varchar(80) NOT NULL,
password varchar(20) NOT NULL,
quota INT(10) DEFAULT '10485760',
PRIMARY KEY (email)
) TYPE=MyISAM;

CREATE TABLE transport (
domain varchar(128) NOT NULL default '',
transport varchar(128) NOT NULL default '',
UNIQUE KEY domain (domain)
) TYPE=MyISAM; wiec nazwa bazy to mail, user: mail_admin, haslo: haslo.

nie wiem czy mam wszystko ok wiec pokarze troche plików konfigurowałem na przyładzie http://howtoforge.com/virtual_users_...ix_debian_etch
a wiec :

more /etc/postfix/mysql-virtual_domains.cf
user = mail_admin
password = haslo
dbname = mail
query = SELECT domain AS virtual FROM domains WHERE domain='%s'
hosts = 127.0.0.1 more /etc/postfix/mysql-virtual_forwardings.cf
user = mail_admin
password = haslo
dbname = mail
query = SELECT destination FROM forwardings WHERE source='%s'
hosts = 127.0.0.1 more /etc/postfix/mysql-virtual_mailboxes.cf
user = mail_admin
password = haslo
dbname = mail
query = SELECT CONCAT(SUBSTRING_INDEX(email,'@',1),'/',
SUBSTRING_INDEX(email,'@',1),'/') FROM users WHERE email='%s'
hosts = 127.0.0.1 more /etc/postfix/mysql-virtual_email2email.cf
user = mail_admin
password = haslo
dbname = mail
query = SELECT email FROM users WHERE email='%s'
hosts = 127.0.0.1 more /etc/postfix/mysql-virtual_transports.cf
user = mail_admin
password = haslo
dbname = mail
query = SELECT transport FROM transport WHERE domain='%s'
hosts = 127.0.0.1 more /etc/postfix/mysql-virtual_mailbox_limit_maps.cf
user = mail_admin
password = haslo
dbname = mail
query = SELECT quota FROM users WHERE email='%s'
hosts = 127.0.0.1 more //etc/postfix/main.cf
more //etc/postfix/main.cf

myhostname = maksior.zadupie.eu
mydestination = localhost, localhost.localdomain
mynetworks = 127.0.0.0/8
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domai
ns $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $myne
tworks $virtual_mailbox_limit_maps more /etc/default/saslauthd

# Settings for saslauthd daemon
#

# Should saslauthd run automatically on startup? (default: no)
START=yes

# Which authentication mechanisms should saslauthd use? (default: pam)
#
# Available options in this Debian package:
# getpwent  -- use the getpwent() library function
# kerberos5 -- use Kerberos 5
# pam      -- use PAM
# rimap    -- use a remote IMAP server
# shadow    -- use the local shadow password file
# sasldb    -- use the local sasldb database file
# ldap      -- use LDAP (configuration is in /etc/saslauthd.conf)
#
# Only one option may be used at a time. See the saslauthd man page
# for more information.
#
# Example: MECHANISMS="pam"
MECHANISMS="pam"

# Additional options for this mechanism. (default: none)
# See the saslauthd man page for information about mech-specific options.
MECH_OPTIONS=""

# How many saslauthd processes should we run? (default: 5)
# A value of 0 will fork a new process for each connection.
THREADS=5

# Other options (default: -c)
# See the saslauthd man page for information about these options.
#
# Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
# Note: See /usr/share/doc/sasl2-bin/README.Debian
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r" more /etc/pam.d/smtp
auth    required  pam_mysql.so user=mail_admin passwd=haslo host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
account sufficient pam_mysql.so user=mail_admin passwd=haslo host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1 more /etc/postfix/sasl/smtpd.conf
pwcheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: mysql
sql_hostnames: 127.0.0.1
sql_user: mail_admin
sql_passwd: haslo
sql_database: mail
sql_select: select password from users where email = '%u' more /etc/courier/authmysqlrc
MYSQL_SERVER localhost
MYSQL_USERNAME mail_admin
MYSQL_PASSWORD haslo
MYSQL_PORT 0
MYSQL_DATABASE mail
MYSQL_USER_TABLE users
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD "/home/vmail"
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
MYSQL_QUOTA_FIELD quota może ktos bardziej doświadczony pomoże :)
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • minister.pev.pl

  •  

     


     

     
    Copyright 2003. MĂłj serwis