>[оверквотинг удален]
>Ставишь постфиксадмин, например по http://www.sys-adm.org.ua/mail/mail-howto-p1.php
>Потом в папке, куда постфиксадмин стал читаешь мануал /postfixadmin/VIRTUAL_VACATION/INSTALL.TXT и делаешь шаг-в-шаг
>как там.
>С единственным отличием: в файле master.cf пишешь не filter, a vacation.
>Еще возможны проблемы с транспортом - но это уже зависит от того,
>как он у тебя реализован - через файл или БД.
>В файле постфиксадмина config.inc.php включаешь режим каникул - $CONF[VACATION]='YES'.
>Ну и в целом все. Через веб-интерфейс твои пользователи смогут задавать текст
>автоответа.
>Уважаемые линуксоиды/
не могли бы подсказать как настроить автоответичик на postfix'e. Я вроде настроил и никак не пашет автоответчик/ Как изменит ситуацию? Моя сборка
openSuSE10.2+Postfix+Dovecot+Mysql+Postfixadmin+Squrel Mail
Вот мой конфиг/
>/etc/postfix/main.cf
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
html_directory = /usr/share/doc/packages/postfix24/html
inet_interfaces = all
mail_owner = postfix
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination = localhost
mydomain = domain.com
myhostname = domain.com
mynetworks = 127.0.0.0/8, 192.168.0.0/24
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix24/README_FILES
recipient_delimiter = +
relay_domains = $mydestination
relayhost =
sample_directory = /usr/share/doc/packages/postfix24/samples
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtpd_banner = $myhostname ESMTP $mail_name (openSUSE/GNU)
smtpd_data_restrictions = reject_unauth_pipelining, reject_multi_recipient_bounce, permit
smtpd_recipient_restrictions = permit_mynetworks, permit_tls_all_clientcerts, permit_sasl_authenticated, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname, reject_unknown_sender_domain, reject_rbl_client zen.spamhaus.org, reject_rbl_client list.dsbl.org, reject_rhsbl_sender dsn.rfc-ignorant.org, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/ssl/mycompany/mailserver/mail-cert.pem
smtpd_tls_key_file = /etc/ssl/mycompany/mailserver/mail-key.pem
smtpd_tls_loglevel = 0
smtpd_tls_received_header = no
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:/var/spool/postfix/smtpd_tls_session_cache
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = proxy:mysql:$config_directory/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:12
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:mysql:$config_directory/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = proxy:mysql:$config_directory/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 150
virtual_transport = dovecot
virtual_uid_maps = static:150
>/etc/postfix/master.cf
#
# Postfix master process configuration file. For details on the format
# of the file, see the Postfix master(5) manual page.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
#tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
#localhost:10025 inet n - n - - smtpd -o content_filter=
scache unix - - n - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
procmail unix - n n - - pipe
flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}
retry unix - - n - - error
dovecot unix - n n - - pipe
flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/deliver -d ${recipient}
tlsmgr unix - - n 1000? 1 tlsmgr
filter unix - n n - - pipe
flags=user=vacation argv=/var/spool/vacation/vacation.pl
>/etc/dovecot/dovecot.conf
base_dir = /var/run/dovecot/
protocols = imap imaps pop3 pop3s
protocol imap {
listen = *:143
ssl_listen = *:993
}
protocol pop3 {
listen = *:110
ssl_listen = *:995
}
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
syslog_facility = mail
ssl_disable = no
ssl_cert_file = /etc/ssl/mycompany/mailserver/mail-cert.pem
ssl_key_file = /etc/ssl/mycompany/mailserver/mail-key.pem
ssl_parameters_regenerate = 168
verbose_ssl = no
mail_location = maildir:/var/vmail/%d/%u
mail_extra_groups = mail
mail_debug = no
first_valid_uid = 150
last_valid_uid = 150
maildir_copy_with_hardlinks = yes
protocol imap {
login_executable = /usr/lib/dovecot/imap-login
mail_executable = /usr/lib/dovecot/imap
imap_max_line_length = 65536
}
protocol pop3 {
login_executable = /usr/lib/dovecot/pop3-login
mail_executable = /usr/lib/dovecot/pop3
pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
postmaster_address = postmaster@domain.com
sendmail_path = /usr/lib/sendmail
auth_socket_path = /var/run/dovecot/auth-master
}
auth_verbose = no
auth_debug = no
auth_debug_passwords = no
auth default {
mechanisms = plain
passdb pam {
}
passdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
userdb passwd {
}
userdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
user = nobody
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0660
user = vmail
group = mail
}
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}
dict {
#quota = mysql:/etc/dovecot-dict-quota.conf
}
plugin {
}
/etc/dovecot/dovecot-sql.conf
driver = mysql
connect = host=localhost dbname=mail user=mail password=mail
default_pass_scheme = MD5
user_query = SELECT '/var/vmail/%d/%n' as home, 'maildir:/var/vmail/%d/%n' as mail, 150 AS uid, 12 AS gid, concat('dirsize:storage=', quot) AS quota FROM mailbox WHERE username = '%u' AND active = '1'
password_query = SELECT username as user, password, '/var/vmail/%d/%n' as userdb_home, 'maildir:/var/vmail/d/%n' as userdb_mail, 150 as userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'
password_query = SELECT null AS password, '%u' AS user
>/etc/postfix/mysql_virtual_alias_maps.conf
user = mail
password = mail
hosts = localhost
dbname = mail
table = alias
select_field = goto
where_field = address
additional_conditions = and active = '1'
#query = SELECT goto FROM alias WHERE address = '%s' AND active = '1'
>/etc/postfix/mysql_virtual_domains_maps.cf
user = mail
password = mail
hosts = localhost
dbname = mail
table = domain
select_field = domain
where_field = domain
additional_conditions = and backupmx = '0' and active = '1'
#query = SELECT domain FROM domain WHERE domain = '%s' AND backupmx = '0' AND active = '1'
>/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
user = mail
password = mail
hosts = localhost
dbname = mail
table = mailbox
select_field = quota
where_field = username
additional_conditions = and active = '1'
#query = SELECT quota FROM mailbox WHERE username = '%s' AND active = '1'
>/etc/postfix/mysql_virtual_mailbox_maps.cf
user = mail
password = mail
hosts = localhost
dbname = mail
table = mailbox
select_field = CONCAT(domain,'/',maildir)
where_field = username
additional_conditions = and active = '1'
#query = SELECT CONCAT(domain,'/',maildir) FROM mailbox WHERE username = '%s' AND active = '1'
Теперь ставлю веб сервер и прочие дела к нему php
Ставлю postfixadmin в директоию вебсервера
Так вот конфигурирую его
>/srv/www/htdocs/postfixadmin/config.inc.php
<?php
{
header ("Location: login.php");
exit;
}
$CONF['postfix_admin_url'] = 'http://domain.com/postfixadmin/';
$CONF['postfix_admin_path'] = '/srv/www/htdocs/postfixadmin/';
$CONF['default_language'] = 'en';
$CONF['database_type'] = 'mysqli';
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'mail';
$CONF['database_password'] = 'mail';
$CONF['database_name'] = 'mail';
$CONF['database_prefix'] = '';
$CONF['admin_email'] = 'postmaster@domain.com;
$CONF['smtp_server'] = 'localhost';
$CONF['smtp_port'] = '25';
$CONF['encrypt'] = 'md5crypt';
$CONF['generate_password'] = 'NO';
// Page Size
// Set the number of entries that you would like to see
// in one page.
$CONF['page_size'] = '20';
// Default Aliases
// The default aliases that need to be created for all domains.
$CONF['default_aliases'] = array (
'abuse' => 'abuse@domain.com',
'hostmaster' => 'hostmaster@domain.com',
'postmaster' => 'postmaster@domain.com',
'webmaster' => 'webmaster@domain.com'
);
$CONF['domain_path'] = 'NO';
$CONF['domain_in_mailbox'] = 'YES';
$CONF['aliases'] = '10';
$CONF['mailboxes'] = '10';
$CONF['maxquota'] = '10';
$CONF['quota'] = 'NO';
$CONF['quota_multiplier'] = '1024000';
$CONF['transport'] = 'YES';
$CONF['vacation'] = 'YES';
$CONF['vacation_domain'] = 'autoreply.domain.com';
$CONF['alias_control'] = 'NO';
$CONF['special_alias_control'] = 'YES';
$CONF['logging'] = 'YES';
$CONF['show_header_text'] = 'NO';
$CONF['header_text'] = ':: Postfix Admin ::';
$CONF['show_footer_text'] = 'YES';
$CONF['footer_text'] = 'Return to domain.com';
$CONF['footer_link'] = 'http://mail.domain.com';
$CONF['welcome_text'] = <<<EOM
Hi,
Welcome to your new account.
EOM;
?>
Так вот создал и эксортировал базу с DATABASE_MYSQL.TXT
Вроде прошло успешно/ Тпереб проверяю пашет ли сам почтовик. Создал домен с постихадмин создался успешно/ Также созда пользователей тоже успешно/ Попроповал отправить письма все отлично пашет/ Я не могу понять почему то у меня не пашет фишка автоответчика/ Вроде в постификсамине конфиг поставил значение на YES
$CONF['vacation'] = 'YES';
$CONF['vacation_domain'] = 'autoreply.domain.com';
После сохранение все перезапустил Сморю в настройках вебинтерфейса постфикадмина не нашел куда надо назначать определеннойго юзера автоответчиком/
Что я сделал дальше перечитал манул постфиксадмина нашел в папке VIRTUAL_VACATION
И там было сказано
Install Virtual Vacation
------------------------
1. Create a local account
-------------------------
Create a dedicated local user account called "vacation".
This user handles all potentially dangerous mail content - that is why it
should be a separate account.
Do not use "nobody", and most certainly do not use "root" or "postfix". The
user will never log in, and can be given a "*" password and non-existent
shell and home directory.
This should look like this:
#/etc/passwd
vacation:*:65501:65501::0:0:Virtual Vacation:/nonexistent:/sbin/nologin
#/etc/group
vacation:*:65501:
2. Create a directory
---------------------
Create a directory, for example /var/spool/vacation, that is accessible
only to the "vacation" user. This is where the vacation script is supposed
to store its temporary files.
3. Copy the files
-----------------
Copy the vacation.pl file to the directory you created above:
$ cp vacation.pl <HOME>/vacation.pl
$ chown -R vacation:vacation <HOME>
Which will then look something like:
-rwx------ 1 vacation vacation 3356 Dec 21 00:00 vacation.pl*
4. Setup the transport type
--------------------
Define the transport type in the Postfix master file:
#/etc/postfix/master.cf:
filter unix - n n - - pipe
flags=DRhu user=vacation argv=/var/spool/vacation/vacation.pl
Tell Postfix to use a transport maps file, so add the following to your
Postfix main.cf:
#/etc/postfix/main.cf:
transport_maps = hash:/etc/postfix/transport
Then add the transport definition to the newly created transport file.
Obviously, change yourdomain.com to your own domain. This can be any
arbitrary domain, and it is easiest if you just choose one that will be used
for all your domains.
#/etc/postfix/transport
autoreply.yourdomain.com vacation
Execute "postmap /etc/postfix/transport" to build the hashed database.
Execute "postfix reload" to complete the change.
5. Create the table
-------------------
To use Virtual Vacation with Postfix Admin you need to create an extra table
in the database that is used by Postfix Admin.
USE postfix;
#
# Table structure for table vacation
#
CREATE TABLE vacation (
email varchar(255) NOT NULL default '',
subject varchar(255) NOT NULL default '',
body text NOT NULL,
cache text NOT NULL,
domain varchar(255) NOT NULL default '',
created datetime NOT NULL default '0000-00-00 00:00:00',
active tinyint(4) NOT NULL default '1',
PRIMARY KEY (email),
KEY email (email)
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Vacation';
Все так и сделал все равно не запахало/
Сижу ишу выходы так исправит ситуацию/ Смотрю в папке ADDITIONS
Нашел вот такую интересную фичу
- postfixadmin-0.3-1.4.tar.gz
by Florian Kimmerl <info at spacekoeln dot de>
The Postfixadmin SquirrelMail plugin let users change their virtual alias,
vacation status/message and password.
Так вот прочитал инструкцию и там сказанно что это плагин для белкомэйла/
Отлчино/ Скачал белкомэйл установил настроил? почта вроде работает и отправялет письма туда сюда все хорошо/ Затем в конфиге установил этот плагин/ Вроде установился/ Захожу в опции и вижу что у меня появилась фишка в белкомэйле Автоответчик/ В начале обрадовался что оно появилась вроде все включил автоответчик/ Пробую отправить с др/ адреса/ Письмо пришло а автоответчик не сработал/ Вот и на этом я приехал/
Смотрю в логах там вообще про автоответчик ничего не сказано так сказано что я отправил письмо и оно доставлено по этому адресу
кусок лога
Aug 5 23:34:25 mail postfix/cleanup[8828]: 8D5DB3C166: message-id=<17965.127.0.0.2.1186338865.squirrel@mail.domain.com>
Aug 5 23:34:25 mail postfix/smtpd[8822]: disconnect from localhost[127.0.0.1]
Aug 5 23:34:25 mail postfix/qmgr[8591]: 8D5DB3C166: from=<vasya.pupkin@domain.com>, size=746, nrcpt=1 (queue active)
Aug 5 23:34:25 mail dovecot: imap-login: Login: user=<vasya.pupkin@domain.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Aug 5 23:34:25 mail deliver(pupkin.vasya@domain.com): msgid=<17965.127.0.0.2.1186338865.squirrel@mail.domain.com>: saved mail to INBOX
Aug 5 23:34:25 mail postfix/pipe[8831]: 8D5DB3C166: to=<pupkin.vasya@domain.com>, relay=dovecot, delay=0.37, delays=0.13/0.04/0/0.2, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 5 23:34:25 mail postfix/qmgr[8591]: 8D5DB3C166: removed
P.S. Коментарии специально убраны для экономия место сообщения/
Уважаемые линуксоды/ Не ужели так трудно поделиться/ Есть некоторые люди которые знают и ничего не говорят/ Ведь мы люди мы всегда испытываем трудности/ Вы тоже когда то просили помощь у знающих людей/ Мы все соверщенствуем свои знание/ И этого всегда мало/ Вы знаете/ однажды хороший мой друг сказал/ знание не бывают достаточными/
За ранее спасибо!