Emails are vital for online businesses. That’s why email errors are a nuisance for server owners.
At Bobcares, we often resolve many such email errors as a part of our Technical Support Services for web hosting companies.
Today, we’ll see what causes “unknown mail transport error” in servers and how we fix them.
What causes “unknown mail transport error” in servers
Postfix is a commonly used mail server in Linux servers. Many control panels like Plesk offers Postfix mail server as part of its installation.
Postfix can also be integrated with third party mail server providers such as SendGrid. But at times, Postfix can throw errors during mail delivery.
One such issue is when server owners report of mail delivery errors. We examine the mail logs and notice a lot of undelivered outgoing emails in the mail queue.
The mail logs at /var/log/maillog often show these errors:
postfix/error[12027]: 541B4649412: to=, relay=none, delay=113711, delays=193632/1/0/0.01, status=deferred (unknown mail transport error)
The major causes for this error are:
1. Postfix configuration issues
The main configuration file of Postfix is /etc/postfix/main.cf. This file contains the default Postfix settings such as transport settings, network, mail server IP and so on.
In cases of external mail server or other special requirement, custom settings have to be done in this configuration file. This include adding IPs that can relay through the server.
Any wrong entries in this configuration file can lead to errors in email delivery, such as “unknown mail transport error”. Software updates or patches can also corrupt Postfix installation and cause errors.
2. File permissions
The mail queue, configuration file, filters and mail folders, all these need to have proper ownership and permissions for mail delivery to work fine.
Usernames and passwords are saved in the file /etc/postfix/sasl_passwd. This file should be readable by Postfix service and need to have proper ownership and permissions.
After adding entries to the password file, it should be mapped to a database file in postfix. The database and other related files should have the right access privileges.
3. Missing aliases
Email aliases usually refers to forwarders to various email accounts. It can happen that sometimes the aliases contain non-existent or invalid email accounts, giving out errors in email delivery.
4. Third party integration
Postfix can be integrated with third party mail servers like SendGrid, Mandrill, etc. For mails to relay through their servers, custom configuration has to be done in Postfix.
In some installations of Postfix, only alphanumeric passwords are allowed. If the SendGrid password is not in that format or there are any configuration mistakes, mail server will throw errors.
How to fix “unknown mail transport error” in Postfix servers
1. Fix configuration errors
The major reason for “unknown mail transport error” is the error in configuration file. We figure out the erroneous entries and correct them.
In cases where the Postfix configuration is corrupt, we rebuild the configuration files and repair the Postfix installation and confirm that mails are working fine.
2. Examine email aliases
If the error is specific to only specific email addresses or aliases, we examine those aliases and figure out the missing accounts. We update these aliases for the mails to work fine.
3. Permission and ownership updates
We cross-check the permissions and ownership of the related files and folders and update them so that Postfix service can access them and deliver mails without errors.
4. Reinstall Postfix
In cases where the error occurred after any software or package updates, we pinpoint the module or patch that caused the issue. We reinstall or reconfigure those to ensure successful mail functioning.
In the servers we manage, we conduct periodic server audits to confirm the success of software updates and functioning of services. For the upgrades we perform, we take actions to avoid such issues.
Conclusion
Email errors can be vexing for server owners. Today, we saw how our Outsourced Tech Support team easily fix the error ‘unknown mail transport error’ for our customers.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
SEE SERVER ADMIN PLANS
var google_conversion_label = «owonCMyG5nEQ0aD71QM»;
Postfix is used commonly in Linux servers as the default mail server. Also in control panels like Plesk, you’re going to find Postfix installed in it. Just like other services, it is susceptible to errors. There are many errors users and admins can come across. And one of them is the ‘unknown mail transport error’. Its the server owners who get this error when sending emails. If you navigate into the mail logs at /var/log/maillog:
Code:
postfix/error[12027]: 541B4649412: to=<user@email.com>, relay=none, delay=113711, delays=193632/1/0/0.01, status=deferred (unknown mail transport error)
In this article, learn why this error occurs and some of the ways to fix it.
4 Reasons Behind the unknown mail transport error
There are four reasons why this error may occur. Those are:
- Configuration issues in Postfix
Postfix has a configuration file at /etc/postfix/main.cf. It contains a wide range of settings for transport settings, network, mail server IP, among others.
If the mail server you’re sending emails to is external, you need to apply custom settings in the configuration file. Among other things, you’d have to add IP addresses that can relay through the server.
When making the changes, you need to be careful. Any incorrect information in this file will lead to ‘unknown mail transport error.’ In some cases, software updates and patching also make changes to the configuration files. This leads to the transport error in some cases.
- Incorrect file permissions
For an email to be delivered successfully, its important that the correct ownership and permission are set for mail queue, filters, configuration file, and mail folders.
You can access usernames and their respective passwords at /etc/postfix/sasl_passwd. You need to make sure that you’ve set up adequate ownership and permissions that the Postfix services needs. Also, you’d have to add entries to the password file and map them to a database file in postfix. The database, too, should have required privileges.
- Aliases missing
Email aliases are essentially the forwards to other email accounts. In some cases, the alias may contain invalid email accounts or accounts that don’t exist. So you’re likely to face errors in email delivery.
- Incorrect third party integration
You can integrate Postfix with third-party services like SendGrid. But for the emails to be successfully relay through their servers, you must apply custom configuration correctly.
In some versions of Postfix, you’re limited to using alphanumeric passwords. In case the SendGrid doesn’t have the same format, you’re likely to run into this error.
Fixing the Error
There are a few ways you can fix the error. And it starts with recognizing the core issue. Here are the solutions:
- Fix configuration errors
The primary reason for this error is misconfiguration. Therefore, you need to fix the configuration errors at the config file. Figure out the erroneous entries and fix them.
If the configuration file is corrupted, you need to rebuild it and repair Postfix installation. This should fix the error.
- Check the email aliases
If email aliases are missing or email accounts doesn’t exist, then you need to update the alises to fix the issue.
- Update permission and ownership
To ensure Postfix service is able to access required files and folder, you need to update the permission and ownership details.
- Reinstall Postfix
Lastly, you can reinstall Postfix if the error resulted from a software or package update. Or, you can also update/restore specific module or patch that might be causing the error.
So that’s how you deal with the ‘unknown mail transport error’. Its a relay error that affects mail delivery. For more assistance, contact the support team.
I have configured postfix similar to this one: «Recipient address rejected» when sending an email with sendgrid
$ /etc/postfix/main.cf
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:username:password
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = may
header_size_limit = 4096000
relayhost = [smtp.sendgrid.net:587]
But I keep getting such errors:
Feb 3 22:57:29 vsempprdapp11 postfix/error[24019]: 327A4441481: to=<DistU_MyAdmin@bratgroup.com>, relay=none, delay=193633, delays=193632/1/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
netstat shows I have port 25 listening
/var/www/app: netstat -an | grep :25
tcp 0 0 0.0.0.0:25 0.0.0.0:*
LISTEN
tcp6 0 0 :::25 :::*
LISTEN
udp6 0 0 fe80::250:56ff:fe96:123 :::*
my postconf
Another interesting thing is, if I change my main.cf
to following it works for non-domain emails-ids(email addresses other than @bratgroup.com like @gmail.com, @hotmail.com emails get delivered). And for @bratgroup.com mail.log says connection timed out
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
myorigin = mybrat.bratgroup.com
mydomain = mybrat.bratgroup.com
myhostname = mybrat.bratgroup.com
mydestination = localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
message_size_limit = 27852800
append_dot_mydomain = no
biff = no
readme_directory = no
#delay_warning_time = 4h
# TLS parameters
smtpd_use_tls=yes
smtpd_tls_cert_file=/etc/apache2/ssl/mybrat.bratgroup.com/site.crt
smtpd_tls_key_file=/etc/apache2/ssl/mybrat.bratgroup.com/site.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# opportunistic encryption, as a client
smtp_tls_security_level = may
bounce_template_file = /etc/postfix/bounce.cf
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
relayhost =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
virtual_mailbox_domains = mybrat.bratgroup.com
virtual_mailbox_maps =
This document (7010291) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 11 Service Pack 1
PostFix
Situation
Unknown Mail Transport Error messages in the PostFix log.
File pile up in the mailq folder
Resolution
Make sure the file is owned by root.
Also, make it has the rights of -rw-r—r—.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented «AS IS» WITHOUT WARRANTY OF ANY KIND.
- Document ID:7010291
- Creation Date:
12-Mar-2012 - Modified Date:28-Sep-2022
-
- SUSE Linux Enterprise Server
< Back to Support Search
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com
Здравствуйте. Я не очень хорош в почтовиках, но вот понадобилось настроить почтовый сервер.
Скомпилировав рекомендации из нескольких статей и даже почитав документацию, я получил более-менее рабочее решение. Ну в том смысле, что я не до конца понимаю, как оно работает, но получаю ожидаемый результат. Вернее, не всегда получаю ожидаемый результат, что и привело меня на форум.
Итак, когда я делаю вот так: cat /tmp/test |mail test@testdomain.ru , то письмо падает в локальный каталог с почтой. А если я пробую отправить письмо с помощью telnet вот так:
Код: Выделить всё
telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 SRVNAME ESMTP Postfix (Debian/GNU)
helo test@testdomain.ru
250 SRVNAME
mail from:<test@testdomain.ru>
250 2.1.0 Ok
rcpt to:<test@testdomain.ru>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
test
.
250 2.0.0 Ok: queued as 6B3EF23F923
То письмо уничтожается, с таким логом:
Код: Выделить всё
Jan 7 19:43:36 SRVNAME postfix/smtpd[16839]: connect from localhost[127.0.0.1]
Jan 7 19:43:52 SRVNAME postfix/smtpd[16839]: 6B3EF23F923: client=localhost[127.0.0.1]
Jan 7 19:43:57 SRVNAME postfix/cleanup[16846]: 6B3EF23F923: hold: header Received: from test?testdomain.ru (localhost [127.0.0.1])??by SRVNAME (Postfix) with SMTP id 6B3EF23F923??for <test@testdomain.ru>; Sat, 7 Jan 2017 19:43:45 +0300 (MSK) from localhost[127.0.0.1]; from=<test@testdomain.ru> to=<test@testdomain.ru> proto=SMTP helo=<test?testdomain.ru>
Jan 7 19:43:57 SRVNAME postfix/cleanup[16846]: 6B3EF23F923: message-id=<20170107164352.6B3EF23F923@SRVNAME>
Jan 7 19:43:57 SRVNAME MailScanner[13198]: New Batch: Scanning 1 messages, 954 bytes
Jan 7 19:43:57 SRVNAME MailScanner[13198]: Virus and Content Scanning: Starting
Jan 7 19:44:13 SRVNAME MailScanner[13198]: Requeue: 6B3EF23F923.AA452 to A613E24096B
Jan 7 19:44:13 SRVNAME postfix/qmgr[11496]: A613E24096B: from=<test@testdomain.ru>, size=320, nrcpt=1 (queue active)
Jan 7 19:44:13 SRVNAME postfix/qmgr[11496]: warning: connect to transport private/spamfilter: No such file or directory
Jan 7 19:44:13 SRVNAME MailScanner[13198]: Uninfected: Delivered 1 messages
Jan 7 19:44:13 SRVNAME MailScanner[13198]: Deleted 1 messages from processing-database
Jan 7 19:44:13 SRVNAME postfix/error[16868]: A613E24096B: to=<test@testdomain.ru>, relay=none, delay=28, delays=28/0.01/0/0.05, dsn=4.3.0, status=deferred (mail transport unavailable)
Jan 7 19:44:40 SRVNAME postfix/smtpd[16839]: lost connection after UNKNOWN from localhost[127.0.0.1]
Jan 7 19:44:40 SRVNAME postfix/smtpd[16839]: disconnect from localhost[127.0.0.1]
Я полагаю, проблема где-то между warning: connect to transport private/spamfilter: No such file or directory и status=deferred (mail transport unavailable) . Но понять ничего не выходит, к сожалению.
Пожалуй, покажу конфиги:
Код: Выделить всё
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
myhostname = SRVNAME
#For mailscanner
header_checks = regexp:/etc/postfix/header_checks
#Время, в течении которого письма будут находится в очереди
maximal_queue_lifetime = 5d
#Ограничение на размер письма в байтах
message_size_limit = 10000000
#Дополнительные файлы конфигурации
additional_config_dir = /etc/postfix/config
alias_maps = hash:/etc/aliases
#Список доменов, для которых почта будет доставляться локально, а не пересылаться на другой хост.
mydestination = $myhostname, localhost, localhost.$mydomain, $myhostname.$mydomain
#Локальные сети
mynetworks = 127.0.0.0/8 192.168.251.0/24
#Карта алиасов
virtual_alias_maps = proxy:mysql:$additional_config_dir/mysql-virtual_forwardings.cf, mysql:$additional_config_dir/mysql-virtual_email2email.cf
#Карта расположения почтовых ящиков
virtual_mailbox_maps = proxy:mysql:$additional_config_dir/mysql-virtual_mailboxes.cf
#Содержит имена обслуживаемых доменов
virtual_mailbox_domains = proxy:mysql:$additional_config_dir/mysql-virtual_domains.cf
#Нужен чтобы по MAIL FROM узнать логин и затем сверить с логином, по которому прошла аутентификация.
smtpd_sender_login_maps = mysql:$additional_config_dir/mysql-virtual_email2email.cf
#Путь до каталога хранилища почты
virtual_mailbox_base = /var/spool/postfix/maildir
#Карта UID-ов виртуальных пользователей
virtual_uid_maps = static:5000
#Тоже самое для групп:
virtual_gid_maps = static:5000
#Поддержку sasl авторизации
smtpd_sasl_auth_enable = yes
#Поддержки старых версий почтовых клиентов, например Microsoft Outlook Express 4 и Microsoft Exchange 5, использующих другую форму команды AUTH
broken_sasl_auth_clients = yes
#Требуем, чтобы удаленный SMTP клиент представлял себя в начале SMTP сессии с помощью команды HELO или EHLO.
smtpd_helo_required = yes
#Всегда отправлять EHLO вначале SMTP сессии
smtp_always_send_ehlo = yes
#Отключает SMTP команду VRFY. В результате чего, невозможно определить существование определенного
#ящика. Данная техника (применение команды VRFY) используется спамерами для сбора имен почтовых ящиков.
disable_vrfy_command = yes
#Сообщать ли клиентам о возможности использования TLS (шифрования соединения)
smtpd_use_tls = yes
#Карта транспорта
transport_maps = proxy:mysql:$additional_config_dir/mysql-virtual_transports.cf
#Список таблиц, которым разрешено работать через proxymap (кэширует запросы и снижает нагрузку на БД)
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
#Создаем классы:
smtpd_restriction_classes = verify_sender, rbl_cbl_abuseat_org, rbl_sbl_spamhaus_org, rbl_dul_ru, rbl_spamcop, white_client_ip,
#black_client_ip,
block_dsl, helo_access, white_client, mx_access
#Описание классов:
verify_sender = reject_unverified_sender, permit
rbl_cbl_abuseat_org = reject_rbl_client cbl.abuseat.org
rbl_dul_ru = reject_rbl_client dul.ru
rbl_sbl_spamhaus_org = reject_rbl_client sbl.spamhaus.org
rbl_spamcop = reject_rbl_client bl.spamcop.net
#IP адреса, которые нужно пропускать не смотря ни на что
white_client_ip = check_client_access hash:$additional_config_dir/white_client_ip
###IP адреса, которые нужно блокировать не смотря ни на что
###black_client_ip = check_client_access hash:$additional_config_dir/black_client_ip
#Правила для блокировки dsl/модемных пулов, с которых подключаются клиенты.
block_dsl = regexp:$additional_config_dir/block_dsl
#Соблюдение документа RFC 2821
helo_access = check_helo_access pcre:$additional_config_dir/helo_checks
white_client = check_sender_access pcre:$additional_config_dir/access_vip_sender
mx_access = check_sender_mx_access cidr:$additional_config_dir/mx_access
#Далее restrictions:
#Проверки клиентского компьютера (или другого почтового сервера),
#который соединяется с сервером postfix для отправки письма
smtpd_client_restrictions =
#black_client_ip,
#Принимать письма от клиентов локальной сети
permit_mynetworks,
#Пропускать письма от авторизованный пользователей
permit_sasl_authenticated,
#Если клиент не из mynetworks оценивает reject_unauth_destination. Отклоняется попытки пересылки, если получатель
#сообщения не относится к доменам места назначения и доменам пересылки, указанным в ваших настройках
reject_unauth_destination,
white_client_ip,
#Отвергает запрос, когда клиент отправляет команды SMTP раньше времени, еще не зная о том,
#действительно ли Postfix поддерживает конвейерную обработку команд ESMTP
reject_unauth_pipelining,
helo_access,
block_dsl,
#блокируем клиентов с адресами from, домены которых не имеют A/MX записей
###reject_unknown_address,
#блокирует почту от несуществующих доменов
###reject_unknown_recipient_domain,
###Проверяем домен на записи типа A и MX в DNS — если нет, то отклоняем
###reject_unknown_sender_domain,
rbl_dul_ru,
rbl_sbl_spamhaus_org,
rbl_spamcop,
rbl_cbl_abuseat_org
#Проверки исходящей или пересылаемой через нас почты
smtpd_sender_restrictions = white_client,
white_client_ip,
#black_client_ip,
#если пользователь авторизуется как user1@domain.com и попытается передать письмо в
#котором в качестве обратного адреса указан user2@domain.com, то в ответ получит ошибку
reject_authenticated_sender_login_mismatch,
#Отклоняет сообщения в не существующие домены
reject_unknown_recipient_domain,
###Проверяем домен на записи типа A и MX в DNS — если нет, то отклоняем
###reject_unknown_sender_domain,
#Если имя получателя не соответствует FQDN то отклоняем
reject_non_fqdn_recipient,
#Если имя отправителя не соответствует FQDN - отклоняем
reject_non_fqdn_sender,
permit_sasl_authenticated,
permit_mynetworks,
#Содержит список приватных сетей, которые по всем канонам глобальной сети интернет
#не могут быть использованы в качестве IP для MX записей
mx_access,
#Отклонение писем с несуществующим адресом отправителя
reject_unlisted_sender,
#Если клиент не из mynetworks оценивает reject_unauth_destination. Отклоняется попытки пересылки, если получатель
reject_unauth_destination
#Правила приема почты нашим сервером:
smtpd_recipient_restrictions =
white_client,
#блокирует почту от несуществующих доменов
reject_unknown_recipient_domain,
###Проверяем домен на записи типа A и MX в DNS — если нет, то отклоняем
###reject_unknown_sender_domain,
#Если имя получателя не соответствует FQDN — отклоняем
reject_non_fqdn_recipient,
#Если имя отправителя не соответствует FQDN - отклоняем
reject_non_fqdn_sender,
#Отвергает запрос, когда клиент отправляет команды SMTP раньше времени, еще не зная о том,
#действительно ли Postfix поддерживает конвейерную обработку команд ESMTP
reject_unauth_pipelining,
#Пропускать письма от авторизованный пользователей
permit_sasl_authenticated,
#Принимать письма от клиентов локальной сети
permit_mynetworks,
helo_access,
#Отклонить, если адреса RCPT TO нет в допустимых получателей
reject_unlisted_recipient,
#блокируем клиентов с адресами from, домены которых не имеют A/MX записей
reject_unknown_address,
#Если клиент не из mynetworks оценивает reject_unauth_destination. Отклоняется попытки пересылки, если получатель
#сообщения не относится к доменам места назначения и доменам пересылки, указанным в ваших настройках
reject_unauth_destination,
#Для отказа в приеме сообщениям с пустым именем отправителя конверта, предназначенным нескольким получателям
reject_multi_recipient_bounce
smtpd_data_restrictions =
reject_unauth_pipelining,
reject_multi_recipient_bounce,
permit
#Пропустить серверы, которые приветствуют нас кодом состояния 5xx
smtp_skip_5xx_greeting = no
#Отклонение писем с несуществующим адресом отправителя
smtpd_reject_unlisted_sender = yes
#Отклонение писем с несуществующим адресом получателя
smtpd_reject_unlisted_recipient = yes
Всё самое интересное при этом оказалось в БД. Вот, например, config/mysql-virtual_transports.cf :
Код: Выделить всё
user = postfix
password = password
dbname = mail
query = SELECT transport FROM transport WHERE domain='%s'
hosts = 127.0.0.1
А вот содержимое таблицы:
Код: Выделить всё
SELECT * FROM transport;
domain transport
testdomain.ru :
Ну и master.cf:
Код: Выделить всё
smtp inet n - - - - smtpd
-o content_filter=spamfilter:dummy
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp
showq unix n - - - - showq
error unix - - - - - error
retry unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
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=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
spamfilter unix - n n - - pipe
flags=Rq user=spamfilter argv=/usr/local/bin/spamfilter -f ${sender} -- ${recipient}
А вот так выглядит скрипт /usr/local/bin/spamfilter :
Код: Выделить всё
#!/bin/bash
echo $1 > /tmp/spamc
echo $2 >> /tmp/spamc
echo $3 >> /tmp/spamc
echo $4 >> /tmp/spamc
echo $5 >> /tmp/spamc
/usr/bin/spamc | /usr/sbin/sendmail -i "$@"
exit $?
Файлик /tmp/spamc при этом не создаётся.
В общем, вот так вот всё оно. Буду рад помощи в понимании проблемы.
View previous topic :: View next topic | |||||||||||
Author | Message | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
gohmdoree Guru Joined: 12 Oct 2004 |
|
||||||||||
Back to top |
|
||||||||||
gohmdoree Guru Joined: 12 Oct 2004 |
|
||||||||||
Back to top |
|
||||||||||
gohmdoree Guru Joined: 12 Oct 2004 |
|
||||||||||
Back to top |
|
||||||||||
bunder Bodhisattva Joined: 10 Apr 2004 |
|
||||||||||
Back to top |
|
||||||||||
elgato319 Guru Joined: 15 Sep 2005 |
|
||||||||||
Back to top |
|
||||||||||
gohmdoree Guru Joined: 12 Oct 2004 |
|
||||||||||
Back to top |
|
||||||||||
boudewijn Apprentice Joined: 11 Jan 2005 |
|
||||||||||
Back to top |
|
||||||||||
gohmdoree Guru Joined: 12 Oct 2004 |
|
||||||||||
Back to top |
|
||||||||||
gohmdoree Guru Joined: 12 Oct 2004 |
|
||||||||||
Back to top |
|
||||||||||
gohmdoree Guru Joined: 12 Oct 2004 |
|
||||||||||
Back to top |
|
||||||||||
gohmdoree Guru Joined: 12 Oct 2004 |
|
||||||||||
Back to top |
|
||||||||||
|
You cannot post new topics in this forum |