Saya mencoba mengatur postfix, tetapi saya mendapatkan kesalahan "Kegagalan pencarian sementara"
main.cf:
inet_protocols = ipv4
inet_interfaces = all
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = ns0.dzervas.gr
mydomain = dzervas.gr
myorigin = dzervas.gr
mynetworks_style = host
mydestination = localhost, localhost.$mydomain, $myhostname, $mydomain, mail.$mydomain, www.$mydomain
virtual_mailbox_base = /var/mail/vhost
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 1000
virtual_uid_maps = static:2000
virtual_gid_maps = static:2000
virtual_alias_maps = hash:/etc/postfix/valias
smtp_generic_maps = hash:/etc/postfix/generic
vmailbox:
[email protected] dzervas.gr/dzervas
[email protected] dzervas.gr/dna
[email protected] ns0.dzervas.gr/dzervas
valias:
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
#[email protected] [email protected]
umum:
[email protected] root
pengujian telnet:
Trying <ip>...
Connected to <ip>.
Escape character is '^]'.
220 ns0.dzervas.gr ESMTP Postfix
ehlo test.com
250-ns0.dzervas.gr
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: [email protected]
250 2.1.0 Ok
rcpt to: [email protected]
451 4.3.0 <[email protected]>: Temporary lookup failure
quit
221 2.0.0 Bye
Connection closed by foreign host.
laporan jurnalctl:
May 09 15:09:22 ns0 postfix/smtpd[7754]: error: open database /etc/aliases.db: No such file or directory
May 09 15:09:22 ns0 postfix/smtpd[7754]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
May 09 15:09:22 ns0 postfix/smtpd[7754]: connect from <client-ip>
May 09 15:09:43 ns0 postfix/smtpd[7754]: warning: hash:/etc/aliases is unavailable. open database /etc/aliases.db: No such file or directory
May 09 15:09:43 ns0 postfix/smtpd[7754]: warning: hash:/etc/aliases lookup error for "[email protected]"
May 09 15:09:43 ns0 postfix/smtpd[7754]: NOQUEUE: reject: RCPT from <client-ip>: 451 4.3.0 <[email protected]>: Temporary lookup failure; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<test.com>
May 09 15:09:52 ns0 postfix/smtpd[7754]: disconnect from <client-ip>
Saya harus menunjukkan bahwa saya belum mengatur catatan DNS (dzervas.gr belum menunjuk server baru saya) Juga saya di arch linux x86_64
EDIT: Saya membuat kosong / etc / alias dan kemudian newaliases
masalah baru (di telnet):
rcpt to: [email protected]
550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table
tapi!:
rcpt to: root@localhost
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
hhahahahha
.
250 2.0.0 Ok: queued as <some-code>
EDIT 2: diselesaikan Recipient address rejected: User unknown in local recipient table
dengan menetapkan local_recipient_maps =
di main.cf Namun, sekarang email saya ke [email protected] bisa antri! itu tidak masuk di /var/mail/vmail/dzervas.gr/dzervas/ sebagaimana mestinya!
postfix
smtp
email-server
dzervas
sumber
sumber
dzervas.gr
sudah dikonfigurasikan .. dapatkan DNS Anda bekerja kemudian uji.Jawaban:
Lari
newaliases
. Jika / etc / aliases tidak ada maka buat dulu, lalu jalankannewaliases
.Juga mungkin perbarui / tambahkan
alias_maps = hash:/etc/aliases
ke /etc/postfix/main.cf untuk menghilangkan peringatan lainnya.Lalu coba lagi.
(Jika Anda menguji dengan telnet, Anda tidak perlu menggunakan DNS).
Masalah kedua: Hapus pertama
$myhostname, $mydomain,
darimydestination
, karena domain virtual seharusnya tidak terdaftar di sini.Kemudian tambahkan (ke main.cf):
Muat ulang postfix dan coba lagi.
sumber
mynetworks membutuhkan rentang jaringan yang ketat
Dalam kasus saya, ada rentang ip yang salah di
/etc/postfix/main.cf
.Ada kesalahan
/var/log/maillog
yang saya perhatikan kemudian.Jika seseorang datang ke sini dari pencarian teratas di google dengan pencarian
Temporary lookup failure
, saya katakan silakan cek-cek$mynetworks
format Anda .sumber
5 sen saya:
Saya memang mengubah main.conf, tetapi saya lupa memuat ulang postfix.
setelah memuatnya kembali berfungsi.
sumber