Feeds:
Posts
Comments

Posts Tagged ‘server’

Host Details

smtp-host: 10.0.0.100 [ubuntu 14.04]
client-host: 10.0.0.50 [ubuntu 14.04]
relayhost: Pub IP address [Your/ISP relay host IP]
Error: Relay access denied @client-host

1st Try: Send Email from Command Line Telnet

ubuntu@client-host:~$ telnet stmp-host 25
Trying 10.0.0.50…
Connected to stmp-host.
Escape character is ‘^]’.
220 stmp-host ESMTP Postfix (Ubuntu)
MAIL FROM: sender@myemaildomain.com.jp
250 2.1.0 Ok
RCPT TO: receiver@myemaildomain.com.jp
454 4.7.1 <receiver@myemaildomain.com.jp>: Relay access denied

Error @ SMTP Server: /var/log/mail.log

Dec  7 12:50:33 smtp-host postfix/smtpd[26446]: connect from client-host[10.0.0.50]
Dec  7 12:51:40 smtp-host postfix/smtpd[26446]: NOQUEUE: reject: RCPT from client-host[10.0.0.50]: 454 4.7.1 <receiver@myemaildomain.com.jp>: Relay access denied; from=<sender@myemaildomain.com.jp> to=<receiver@myemaildomain.com.jp> proto=SMTP helo=<myemaildomain.com.jp>
Dec  7 12:51:58 smtp-host postfix/smtpd[26446]: disconnect from client-host[10.0.0.50]

 

Current /etc/postfix/main.cf config @ smtp-host:

# This file is managed by salt – do not edit localy, changes will be overwritten.
#
# 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.

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA’s job.
append_dot_mydomain = no

# Uncomment the next line to generate “delayed mail” warnings
#delay_warning_time = 4h

readme_directory = no

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = client-host
myorigin = client-host
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

mydestination = mail.1nc, localhost.localdomain, localhost, client-host
relayhost = relayhost-ip-address
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128  192.168.1.0/24
mailbox_size_limit = 0
recipient_delimiter = +

Soultion:

Allow Client network 10.0.0.0/24 in smtp-hos: /etc/postfix/main.cf

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128  192.168.1.0/24

To

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128  192.168.1.0/24 10.0.0.0/24

sudo service postfix restart

2nd Try: Send Email from Command Line Telnet

ubuntu@client-host:~$ telnet smtp-host 25
Trying 10.0.0.100…
Connected to smtp-host.
Escape character is ‘^]’.
220 smtp-host ESMTP Postfix (Ubuntu)
HELO myemaildomain.com.jp
250 smtp-host
MAIL FROM: sender@myemaildomain.com.jp
250 2.1.0 Ok
RCPT TO: receiver@myemaildomain.com.jp
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Subject: Test Email
Please Confirm..Testing
Bye from e-mail client host
Thanks
.
250 2.0.0 Ok: queued as 0B81B46041
QUIT
221 2.0.0 Bye
Connection closed by foreign host.

E-mail Sent – Successfully

Dec  7 13:42:08 smtp-host postfix/smtpd[26971]: connect from client-host[10.0.0.50]
Dec  7 13:42:08 smtp-host postfix/smtpd[26971]: 0B81B46041: client=client-host[10.0.0.50]
Dec  7 13:42:08 smtp-host postfix/cleanup[26976]: 0B81B46041: message-id=<642190740.2.1481089328039.JavaMail.root@client-host>
Dec  7 13:42:08 smtp-host postfix/qmgr[26941]: 0B81B46041: from=<sender@myemaildomain.com.jp>, size=666, nrcpt=1 (queue active)
Dec  7 13:42:08 smtp-host postfix/smtpd[26971]: disconnect from client-host[10.0.0.50]
Dec  7 13:42:08 smtp-host postfix/smtp[26978]: 0B81B46041: to=<receiver@myemaildomain.com.jp>, relay=relayhost-ip-address[relayhost-ip-address]:25, delay=0.19, delays=0.01/0/0.01/0.17, dsn=2.6.0, status=sent (250 2.6.0 <642190740.2.1481089328039.JavaMail.root@client-host> [InternalId=720659] Queued mail for delivery)
Dec  7 13:42:08 smtp-host postfix/qmgr[26941]: 0B81B46041: removed

 

Thats all, the above setup was tested using LXC containers on Ubuntu 14.04 LTS.

Advertisements

Read Full Post »

Install MySQL 5.6.x

I have installed Ubuntu 14.10 server x64 on my server. After the installation I installed MySQL Server 5.6.34

sudo apt-get install mysql-server-5.6 mysql-client-5.6 mysql-client-core-5.6

Installation was successful but I noticed the following issues with MySQL-5.6. Using sudo service mysql start and sudo service mysql stop the database starts and stops correctly. But when I use sudo /etc/init.d/mysql stop the database service stops and than it gets spawn again automatically without any user input. Using ps -A | grep mysql I noticed that the spawn gets a new PID.

Have you noticed this issue with mysql. For the same reason mysqladmin -u root -p shutdown does the same thing as sudo /etc/init.d/mysql stop

 

Solution

sudo stop mysql

That’s it. Mysql process stopped without any error.

Sources:

http://www.itfromscratch.com/how-to-stop-the-percona-mysql-server/
http://askubuntu.com/questions/399537/mysql-script-does-not-stop-reboots-mysql

 

திருக்குறள் :: பொருட்பால் :: அரசியல் :: அறிவுடைமை: 423

எப்பொருள் யார்யார்வாய்க் கேட்பினும் அப்பொருள்
மெய்ப்பொருள் காண்ப தறிவு.

எந்தவொரு பொருள்குறித்து எவர் எதைச் சொன்னாலும், அதை அப்படியே நம்பி ஏற்றுக் கொள்ளாமல் உண்மை எது என்பதை ஆராய்ந்து தெளிவதுதான் அறிவுடைமையாகும்.

 

Read Full Post »