Wrong link in Message Quarantine Report

Questions and answers about how to do stuff
Post Reply
User avatar
BruceLeeRoy
Posts: 47
Joined: 01 May 2015 13:27

Wrong link in Message Quarantine Report

Post by BruceLeeRoy »

So I haven't been able to find where I can define efa's url other than in the initial setup. I'd like to be able to allow some of the domain users to see their Quarantine Report. Right now I have been getting the reports myself but the link in them is incorrect, and comes up like this:

http://efa/mailscanner//viewmail.php?id=xxxxxxx

it works if I change it in the browser to:
http://mail.mydomain.com/mailscanner//v ... id=xxxxxxx

It also gives the complaint: "MailScanner has detected a possible fraud attempt from "efa" claiming to be" which is another thing I'm trying to fix.
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Wrong link in Message Quarantine Report

Post by shawniverson »

Use EFA-Configure to set your hostname...

Log into the console...

Choose option 4) IP Settings and make your changes to the hostname and the domain name.
User avatar
BruceLeeRoy
Posts: 47
Joined: 01 May 2015 13:27

Re: Wrong link in Message Quarantine Report

Post by BruceLeeRoy »

Yes, just double checked that and they are properly set. That's why I'm confused.
User avatar
darky83
Site Admin
Posts: 540
Joined: 30 Sep 2012 11:03
Location: eFa
Contact:

Re: Wrong link in Message Quarantine Report

Post by darky83 »

If you logon to the console (ssh to the box and then option 1) what do you get when you run:

Code: Select all

cat /etc/MailScanner/MailScanner.conf | grep -v "#"| grep "Hostname = " && hostname
you should get back the full hostname of your server in both results.
Version eFa 4.x now available!
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Wrong link in Message Quarantine Report

Post by shawniverson »

Quarantine Report uses the hostname as defined by the system.

After running the above command, check /etc/sysconfig/network for a HOSTNAME=<myhostname> entry (no spaces and no <>). If there isn't one there, you need to add one. EFA-Configure assumes that one is already present (as there should be).

After doing this, either restart or run

Code: Select all

sudo service network restart
User avatar
BruceLeeRoy
Posts: 47
Joined: 01 May 2015 13:27

Re: Wrong link in Message Quarantine Report

Post by BruceLeeRoy »

ok so cat of the mailscanner.conf file returned 2 lines, the first line was the proper hostname, then 2nd line was just "efa"

I changed /etc/sysconfig/network as it was set HOSTNAME="efa"

This should fix it! I'll know when I get the next Quarantine report, thanks for the help!
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Wrong link in Message Quarantine Report

Post by shawniverson »

Did you happen to run system-config-network at some point?

That is not something EFA would have put into /etc/sysconfig/network.
User avatar
BruceLeeRoy
Posts: 47
Joined: 01 May 2015 13:27

Re: Wrong link in Message Quarantine Report

Post by BruceLeeRoy »

I don't remember, most likely I did. However, changing the hostname there didnt fix the link problem. :(
User avatar
BruceLeeRoy
Posts: 47
Joined: 01 May 2015 13:27

Re: Wrong link in Message Quarantine Report

Post by BruceLeeRoy »

darky83 wrote:If you logon to the console (ssh to the box and then option 1) what do you get when you run:

Code: Select all

cat /etc/MailScanner/MailScanner.conf | grep -v "#"| grep "Hostname = " && hostname
you should get back the full hostname of your server in both results.
when I do this I get:

Hostname = <proper hostname of my server>
efa

I'm assuming the 2nd line "efa' is wrong
User avatar
darky83
Site Admin
Posts: 540
Joined: 30 Sep 2012 11:03
Location: eFa
Contact:

Re: Wrong link in Message Quarantine Report

Post by darky83 »

See the file /etc/sysconfig/network

it should state a line:

Code: Select all

HOSTNAME = efa.domain.com
if your domain.com is missing there, add it and reboot
Version eFa 4.x now available!
User avatar
BruceLeeRoy
Posts: 47
Joined: 01 May 2015 13:27

Re: Wrong link in Message Quarantine Report

Post by BruceLeeRoy »

the correct info is in /etc/sysconfig/network

but when I type these commands:
[root@efa ~]# hostname
efa
[root@efa ~]# domainname
(none)


I found if I set the hostname with the hostname command, it changes to the corrent hostname, but eventually it will change it back to "efa" must be from some cronjob?
User avatar
darky83
Site Admin
Posts: 540
Joined: 30 Sep 2012 11:03
Location: eFa
Contact:

Re: Wrong link in Message Quarantine Report

Post by darky83 »

Lets see, the domain should be set on your system in the following locations:

Code: Select all

EFA-Config:DOMAINNAME:<domain.com>
hosts:172.18.50.11   <hostname>.<domain.com>   <hostname>
MailScanner/rules/sig.html.rules:To: *@<domain.com> /etc/MailScanner/reports/en/inline.sig.in.html
MailScanner/rules/sig.text.rules:To: *@<domain.com> /etc/MailScanner/reports/en/inline.sig.in.txt
MailScanner/MailScanner.conf:Hostname = <hostname>.<domain.com>
sysconfig/network:HOSTNAME=<hostname>.<domain.com>
Can you check these?
Version eFa 4.x now available!
User avatar
BruceLeeRoy
Posts: 47
Joined: 01 May 2015 13:27

Re: Wrong link in Message Quarantine Report

Post by BruceLeeRoy »

EFA-Config:DOMAINNAME:mydomain.com This is correct

hosts:x.x.x.x mail.mydomain mail This is correct

MailScanner/rules/sig.html.rules & sig.text.rules:
To: *@mydomain.com /etc/MailScanner/reports/en/inline.sig.in.html
To: *@mydomain.com /etc/MailScanner/reports/en/inline.sig.in.txt These are correct

MailScanner/MailScanner.conf:
Hostname = mail.mydomain.com This is correct



sysconfig/network:
HOSTNAME="mail.mydomain.com"
DOMAINNAME="mydomain.com" These are correct

I've set the hostname and domain name using the hostname and domainname commands, they seem to save correctly, then later on it eventually changes itself back to:

[root@efa ~]# hostname
efa
[root@efa ~]# domainname
(none)

Does this after a reboot or after a few hours, almost like there is a cron job or something changing it back to the incorrect values. At one point it almost worked when I got the report by having the hostname "mail" instead of "efa" but the next day changed back to "efa"
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Wrong link in Message Quarantine Report

Post by shawniverson »

What's in your interface configuration? Any chance DNS is overriding your hostname?
User avatar
BruceLeeRoy
Posts: 47
Joined: 01 May 2015 13:27

Re: Wrong link in Message Quarantine Report

Post by BruceLeeRoy »

There is no DNS server running locally on the efa machine, and these changes are happening locally so has nothing to do with DNS

Here is whats happening after reboot:
EFA-Config:DOMAINNAME:mydomain.com This stays correct

hosts file changes from:
x.x.x.x mail.mydomain.com mail
to:
x.x.x.x efa

MailScanner/rules/sig.html.rules & sig.text.rules:
To: *@mydomain.com /etc/MailScanner/reports/en/inline.sig.in.html
To: *@mydomain.com /etc/MailScanner/reports/en/inline.sig.in.txt
These stay correct


MailScanner/MailScanner.conf:
Hostname = mail.mydomain.com
This stays correct



sysconfig/network:
HOSTNAME="mail.mydomain.com"
changes to
HOSTNAME="efa"

DOMAINNAME="mydomain.com" This stays correct


Hostname shell command: this changes from mail.mydomain.com to efa
Domainname shell command: this changes from mydomain.com to (none)
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Wrong link in Message Quarantine Report

Post by shawniverson »

Although you shouldn't be using dhcp....

See the following post.

https://www.centos.org/forums/viewtopic.php?t=24927
User avatar
BruceLeeRoy
Posts: 47
Joined: 01 May 2015 13:27

Re: Wrong link in Message Quarantine Report

Post by BruceLeeRoy »

I'm not using DHCP
User avatar
BruceLeeRoy
Posts: 47
Joined: 01 May 2015 13:27

Re: Wrong link in Message Quarantine Report

Post by BruceLeeRoy »

Found the problem, the hostname was being changed by the VM server. Had to correct it there.
Post Reply