LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-06-2017, 08:48 AM   #1
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Rep: Reputation: Disabled
Why can't send mail from local domain?


Os :debian8 .
Code:
ping  MiWiFi.hwy
PING MiWiFi.hwy (127.0.1.1) 56(84) bytes of data.
64 bytes from MiWiFi.hwy (127.0.1.1): icmp_seq=1 ttl=64 time=0.034 ms
64 bytes from MiWiFi.hwy (127.0.1.1): icmp_seq=2 ttl=64 time=0.036 ms
Code:
hostname
MiWiFi.hwy
Code:
cat /etc/hosts
127.0.0.1	localhost
127.0.1.1	MiWiFi.hwy	MiWiFi
MiWiFi.hwy is my local domain.

I want to send email from my local domain with debian8@MiWiFi.hwy ,debian8 is one of user in my local pc.
Code:
sudo cat  /etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
readme_directory = no
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myhostname = MiWiFi.hwy
mydomain = MiWiFi.hwy
myorigin = $mydomain
mydestination = MiWiFi.hwy, localhost.hwy, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_protocols = all
inet_interfaces = all
default_transport = error
relay_transport = error
home_mail = Maildir
To send email from localhost.
Code:
echo "it is a test" | mail -s "to send mail from local domain" xxxx@yahoo.com
send-mail: the server does not support authentication
send-mail: could not send mail (account default from /home/debian8/.msmtprc)
Can't send mail: sendmail process failed with error code 69
The log for sending email.
Code:
cat .msmtp.log
Oct 06 09:43:32 host=MiWiFi.hwy tls=off auth=on user=pengsir from=debian8@MiWiFi.hwy recipients=xxxx@yahoo.com errormsg='the server does not support authentication' exitcode=EX_UNAVAILABLE
The .msmtprc configuration file.
Code:
cat .msmtprc
account default
host MiWiFi.hwy
user pengsir
from debian8@MiWiFi.hwy
password xxxx
auth login
tls off
logfile .msmtp.log
How to fix it ?

Last edited by luofeiyu; 10-06-2017 at 08:59 AM.
 
Old 10-06-2017, 03:56 PM   #2
thecarpy
Member
 
Registered: Apr 2005
Location: France
Distribution: Devuan, Suse, Slackware
Posts: 130

Rep: Reputation: 21
Could you try
Code:
echo "it is a test" | mail -v -s "to send mail from local domain" xxxx@yahoo.com
The
Code:
-v
causes the mail command to be more verbose about errors.

I found this here: http://board.issociate.de/thread/291...-error-69.html

Please do note that this was the first hit when I searched google for the following: "sendmail process failed with error code 69"
 
Old 10-06-2017, 09:07 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
You might check your ISP's terms of service. In the US, at least, most ISPs will not allow public-facing mail servers unless the user has at least a business-level account. The primary reason for this is to prevent home computers from being used to relay spam.

Last edited by frankbell; 10-06-2017 at 09:08 PM.
 
Old 10-06-2017, 09:46 PM   #4
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Original Poster
Rep: Reputation: Disabled
The right format for /etc/postfix/main.cf
Code:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
data_directory = /var/lib/postfix
mail_owner = postfix
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
 
  
debug_peer_level = 2
debugger_command =
	 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
	 ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop

myhostname =  localhost.localdomain
mydomain = localdomain
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 127.0.0.0/8
home_mailbox = Maildir/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail: send-only when local system has no domain name? catkin Linux - Software 4 10-22-2009 05:29 AM
Postfix cant send mail in local or any outer domain vikki Linux - Server 4 07-22-2009 03:40 PM
Mail(x) on Slackware 12.2 does not send mail to local users wilson47 Linux - Software 4 03-03-2009 03:46 PM
Restrict users of a domain to send/receive mail from one particular domain tanveer Linux - Server 0 09-02-2007 02:01 AM
can send and recieve local mail, but not mail from internet Caine101022 Linux - Software 2 09-09-2005 01:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration