Solved

Postfix Access table issue, New account emails are not being recorded in the acccess table running Exchange 2003

Posted on 2010-09-04
16
370 Views
Last Modified: 2012-05-10
Dear Experts,

Over past two weeks, new email address are not being recorded in the access.db. I am running exchange 2003 enterprise and running postfix as mail relay and normally when we create new email account, the email address gets recorded in postfix access table which enables it to relay emails externally and receive emails from external users.

but if I email that account from my gmail account, the email gets bounced back stating rejected.

Can you please let me know, when can we do to resolve this. There was some kind of tool that runs on exchange that scans ad for new emails and updates  postfix, not sure but that not running anymore.

Please help, experts.

0
Comment
Question by:mshaikh22
  • 11
  • 5
16 Comments
 
LVL 14

Assisted Solution

by:svgmuc
svgmuc earned 500 total points
Comment Utility
Are you running postmap on the access file?
0
 

Author Comment

by:mshaikh22
Comment Utility
i run that command manually postmap access
its still doesnt do anything
the email address dont exist in the access table
tried adding them manually by doing nano access.db
entered the email address manually and save the access.db file restarted postfix.

Worked a few times and after that stopped working
looks the email addresses i put disppear afterward now it doesnt save at all.
0
 

Author Comment

by:mshaikh22
Comment Utility
Hello Experts,


Just wanted to see if anyone has experience this issue before caz im still wondering how to solve this riddle.
Please let me know as soon as you can,

0
 

Author Comment

by:mshaikh22
Comment Utility
Need help with this. I keep manually entering email address in the access.db table. But it disappears after a few days
0
 

Author Comment

by:mshaikh22
Comment Utility
Can you please tell why do the email address that I enter in the database access.db disappear.
0
 
LVL 14

Assisted Solution

by:svgmuc
svgmuc earned 500 total points
Comment Utility
Either something is overwriting your access.db file or your access file is changed and remapped. Check the system for cron jobs.
0
 

Author Comment

by:mshaikh22
Comment Utility
Thank you for that svgmuc. Could you please tell me know where can i look for the cron jobs.
Am I suppose to enter email address manually in the access.db or does the cron job run and does update the emails for me.

0
 
LVL 14

Assisted Solution

by:svgmuc
svgmuc earned 500 total points
Comment Utility
You can run the command

crontab -l

as the user root or the user postfix is running as.
This will list all cron jobs.

A cron job can be any kind of command or script. It may modify data which includes your access.db file. I have no idea though, what is on your mail server.
0
Do email signature updates give you a headache?

Constantly trying to correctly format email signatures? Spending all of your time at every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

 

Author Comment

by:mshaikh22
Comment Utility
this is what i see


0 0,6,12,18,21 * * *       /usr/bin/freshclam
0 0 * * *       /usr/bin/sa-update
0,10,30,50 * * * * /usr/local/bin/exchange-email-push
0 23 * * * find /home/quarantine/ -mtime +10 -exec rm -f {} \;
0
 

Author Comment

by:mshaikh22
Comment Utility
0,10,30,50 * * * * /usr/local/bin/exchange-email-push

how does this work

exchange-email-push
Connected to ex0svr
220 Microsoft FTP Service
500 'AUTH GSSAPI': command not understood
500 'AUTH KERBEROS_V4': command not understood
KERBEROS_V4 rejected as an authentication type
331 Anonymous access allowed, send identity (e-mail name) as password.
230 Anonymous user logged in.
Local directory now /etc/postfix
local: public.emails remote: public.emails
227 Entering Passive Mode (10,168,1,35,134,203).
125 Data connection already open; Transfer starting.
226 Transfer complete.
313123 bytes received in 0.016 seconds (2e+04 Kbytes/s)
local: users.emails remote: users.emails
227 Entering Passive Mode (10,168,1,35,134,206).
125 Data connection already open; Transfer starting.
226 Transfer complete.
334851 bytes received in 0.018 seconds (1.9e+04 Kbytes/s)
221
0
 

Author Comment

by:mshaikh22
Comment Utility
can i get some help on this please.
0
 

Author Comment

by:mshaikh22
Comment Utility
help please

0,10,30,50 * * * * /usr/local/bin/exchange-email-push

how does this work

exchange-email-push
Connected to ex0svr
220 Microsoft FTP Service
500 'AUTH GSSAPI': command not understood
500 'AUTH KERBEROS_V4': command not understood
KERBEROS_V4 rejected as an authentication type
331 Anonymous access allowed, send identity (e-mail name) as password.
230 Anonymous user logged in.
Local directory now /etc/postfix
local: public.emails remote: public.emails
227 Entering Passive Mode (10,168,1,35,134,203).
125 Data connection already open; Transfer starting.
226 Transfer complete.
313123 bytes received in 0.016 seconds (2e+04 Kbytes/s)
local: users.emails remote: users.emails
227 Entering Passive Mode (10,168,1,35,134,206).
125 Data connection already open; Transfer starting.
226 Transfer complete.
334851 bytes received in 0.018 seconds (1.9e+04 Kbytes/s)
221
0
 
LVL 14

Expert Comment

by:svgmuc
Comment Utility
This is just the output of a script.
According to the crontab line, it is run at the full hour, at 10min after the full hour, at 30min after the full hour and 10min to the full hour. (Strange schedule)

It transfers 2 files via FTP, public.emails and users.emails from the server to the postfix server.

I cannot see any other information from this output.
0
 

Author Comment

by:mshaikh22
Comment Utility
Apologies for getting back you  on this.

Could you please help me with this, im thinking whenever this script runs it remove the manually entered email address in access db. Now there something missing in exhcange that prevents the script from running. What could that be.

thank you./


This is the is the script

#!/bin/bash

EXCHANGE=exchange2003
USER=anonymous
NACCESS=access.new
TMP=access.tmp

ftp -v -n "$EXCHANGE" << EOF
user "$USER" sysadmin
lcd /etc/postfix/
get public.emails
get users.emails
quit
EOF
if [ "$?" -ne 0 ]; then
        echo "FTP Exchange push failed to grab new files"
        exit 1
fi


cd /etc/postfix/
# make a copy of the current
cp -f access access.old
cat access.header > "$NACCESS"
cat /dev/null > "$TMP"
/bin/egrep -o '(smtp|SMTP):(.*)' users.emails | sed 's/^smtp://' | sed 's/^SMTP://' | awk '{ print $0"\tOK"; }' >> "$TMP"
/bin/egrep -o '(smtp|SMTP):(.*)' public.emails | sed 's/^smtp://' | sed 's/^SMTP://' | awk '{ print $0"\tOK"; }' >> "$TMP"
sort -u "$TMP" >> "$NACCESS"
mv "$NACCESS" access

#--- update the system
postmap /etc/postfix/access
postfix reload

0
 
LVL 14

Accepted Solution

by:
svgmuc earned 500 total points
Comment Utility
Okay, run that script manually, then look at the log.

/var/log/messages and /var/log/mail should be the places to look.

Can you see anything unusual?
0
 

Author Closing Comment

by:mshaikh22
Comment Utility
Good troubleshooting steps
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Resolve DNS query failed errors for Exchange
Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now