Koozali.org: home of the SME Server

Remove Addres from badmailfrom list

Offline sbaker712

  • *
  • 14
  • +0/-0
Remove Addres from badmailfrom list
« on: July 10, 2008, 01:03:45 AM »
Hello Everyone,

I am trying to remove an address from the badmailfrom list. The list it is located in is /var/qmail/control/badmailfrom.  I have looked around the site to see if I could find any way of doing this. I have the whitelist contrib which can be found here. I have also tried to manually whitelist the address using the how to found here. Which has got me no where but scratching the top of my head.  So after looking around more, I was able to find this topic badmailfrom which talked about this file being templeted so they showed a work around that allows to add more to the list. So with all that being said how do you remove something from this?

Stuart


Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Remove Addres from badmailfrom list
« Reply #1 on: July 10, 2008, 03:09:27 PM »
Quote
I have the whitelist contrib.

When you go to the first panel of that contrib and click on the reject button, you should see the badmailfrom blacklist entries. (Mine is empty so I cannot really test).

Does the entry not show up there?

How did you get the entry in the list?

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Remove Addres from badmailfrom list
« Reply #2 on: July 10, 2008, 03:33:36 PM »
I just did a small test,

1> I added an entry through the Wbl contrib reject page and issued the update command from the contrib.
2> Manually checked the /var/qmail/control/badmailfrom file with Nano (in the command line) and the entry had been added.
3> Added another entry directly in the file with Nano.
4> Check the entries in the Wbl contrib panel and of course could not see the manually added entry.
5> deleted the entry I could see that had been added in the Wbl contrib panel and issued the update command.
6> rechecked the file with Nano and found that is was empty.

Conclusion,

If there are no other template fragments that are adding entries into that file, it can be emptied by issuing the update command from the Wbl contrib, This will remove ALL the entries so if you have some you want to keep, make a list and add them in the contrib so they will be saved back to that file.

You need to find out where the entries that are there are coming from

Offline sbaker712

  • *
  • 14
  • +0/-0
Re: Remove Addres from badmailfrom list
« Reply #3 on: July 10, 2008, 04:43:55 PM »
Mercyh,

The list in the Email WBL contrib section is blank.  The entries I had added a few months prior because of excessive spamming from said locations. During this time a person that emails us from England uses one of the said mail servers we had blacklisted. The list was added to the badmailfrom to help control the amount of incoming spam the server is having to sort through. But now that the name is in the badmailfrom list I am unable to remove it. I have tried to delete it out from /var/qmail/control/badmailfrom and it returns after I do a signal-event email-update. So I am looking for a way to remove entries that are in the badmailfrom list.

Is nano a editor like vi and pico? I am unfamiliar with this program you are referencing.

Stuart

Offline sbaker712

  • *
  • 14
  • +0/-0
Re: Remove Addres from badmailfrom list
« Reply #4 on: July 10, 2008, 04:54:15 PM »
I have looked up nano since my last post and see that it is just another editor. The big deal is that I have removed things from this list using editors and sooner or later it will add the item back into the list. I will be watching the list more carefully over the next couple of days to see if I can spot the return of the item.

Still if anyone knows of a way to whitelist something that is in the badmailfrom list I am still all ears.

Stuart

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Remove Addres from badmailfrom list
« Reply #5 on: July 10, 2008, 05:00:31 PM »
Quote
Is nano a editor like vi and pico? I am unfamiliar with this program you are referencing.
Yes

do you remember how you added them?

There has to be a template hanging out there somewhere that is writing this entry.

Do you have anything here: /etc/e-smith/templates-custom/var/qmail/control/badmailfrom/

What about any entries in this file: /etc/e-smith/templates/var/qmail/control/badmailfrom

PS> You are never supposed to add entries in the second location as this is the default template. You should always add them in the templates-custom directory so if the change mucks up your system you can just delete that entry and re-expand the template to reset to default.
« Last Edit: July 10, 2008, 05:03:22 PM by mercyh »

Offline sbaker712

  • *
  • 14
  • +0/-0
Re: Remove Addres from badmailfrom list
« Reply #6 on: July 10, 2008, 05:10:52 PM »
I have checked both locations and nothing is listed there dealing with what I am looking for.

Locations:
/etc/e-smith/templates/var/qmail/control/badmailfrom does not contain a list of address at all. I has a list that can be added to it but it remains blank. This I believe is how it is created by default.

/etc/e-smith/templates-custom/var/qmail/control/badmailfrom/ I created the file called badmailfrom in in that file I have a list called 20badmailfrom. This is where I am now adding entries that I would like to keep from emailing my server.

So I am unable to find the location of where the entries came from that are all entered into the badmailfrom list in /var/qmail/control/badmailfrom. My assumption is that they were added awhile back using the whitelist contribs reject feature. But I am not that great with the contribs so I don't really know how it relates what I put into the box and how it gets to the file /var/qmail/control/badmailfrom. But that is how I think it is getting to that list.

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Remove Addres from badmailfrom list
« Reply #7 on: July 10, 2008, 05:21:36 PM »
Quote
/etc/e-smith/templates-custom/var/qmail/control/badmailfrom/ I created the file called badmailfrom in in that file I have a list called 20badmailfrom. This is where I am now adding entries that I would like to keep from emailing my server.
Document what you are doing. This may create a situation where you will never be able to figure out what is going on as you will have multiple templates/????? writing into that file.

Quote
So I am unable to find the location of where the entries came from that are all entered into the badmailfrom list in /var/qmail/control/badmailfrom. My assumption is that they were added awhile back using the whitelist contribs reject feature. But I am not that great with the contribs so I don't really know how it relates what I put into the box and how it gets to the file /var/qmail/control/badmailfrom. But that is how I think it is getting to that list.
If you are pretty sure this is the case you need to lodge a bug report against the email-wbl contrib. Darrel would be able to explain what method his contrib uses to write the /var/qmail/control/badmailfrom file and you could check if something is hanging out there incorrectly. If you really used that contrib to add the entries, it should show the list so you could add or remove as you please.

The bug report should be lodged here: http://bugs.contribs.org/enter_bug.cgi?product=SME%20Contribs

In the component window select smeserver-wbl

If you post a bug please link it back in this post.

Offline sbaker712

  • *
  • 14
  • +0/-0
Re: Remove Addres from badmailfrom list
« Reply #8 on: July 10, 2008, 05:24:16 PM »
Thank you for the help. I will file a bug and see if he could answer me why I have never been able to see any of the things I have listed in the contrib. Because if I could this would have made this a lot easier to figure out.

Offline sbaker712

  • *
  • 14
  • +0/-0
Re: Remove Addres from badmailfrom list
« Reply #9 on: July 10, 2008, 05:43:29 PM »
Here is a link to the bug in bug tracker.

http://bugs.contribs.org/show_bug.cgi?id=4444


Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Remove Addres from badmailfrom list
« Reply #10 on: July 10, 2008, 05:47:28 PM »
Try this and post the output:

Code: [Select]
grep -rl 'badmailfrom' /etc/e-smith/templates*

Offline sbaker712

  • *
  • 14
  • +0/-0
Re: Remove Addres from badmailfrom list
« Reply #11 on: July 10, 2008, 05:52:33 PM »
/etc/e-smith/templates/var/service/qpsmtpd/config/plugins/30check_badmailfrom
/etc/e-smith/templates/var/qmail/control/badmailfrom/10wbl_badmailfrom


That is what I get from the output of the code you asked me to run.

/etc/e-smith/templates/var/qmail/control/badmailfrom/10wbl_badmailfrom contains:

Quote
{
    use esmith::ConfigDB;

    my $wdb = esmith::ConfigDB->open_ro('wbl')
      || die "Unable to open wbl configuration dbase.";
    my %list = $wdb->get('badmailfrom')->props;

    $OUT = '';
    my $parameter = "";
    my $value = "";
    while (($parameter,$value) = each(%list)) {
        if ($parameter eq "type") {next;}

        if ($value eq "Black") {
            $OUT .= "$parameter\n";
        }
    }
}


/etc/e-smith/templates/var/service/qpsmtpd/config/plugins/30check_badmailfrom contains

Quote
check_badmailfrom



Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Remove Addres from badmailfrom list
« Reply #12 on: July 10, 2008, 05:57:14 PM »
what do you have with this?

Code: [Select]
/sbin/e-smith/db wbl show
If your entries are coming from the wbl contrib you should see them under

badmailfrom=list

If they are there Darrell will need that information in the bug report


Offline sbaker712

  • *
  • 14
  • +0/-0
Re: Remove Addres from badmailfrom list
« Reply #13 on: July 10, 2008, 06:05:29 PM »
Here is what is listed with that code.

Quote
badmailfrom=list
    @BIGCAPITAL4U.COM=Black
    @EASYFACTORYONLINE.COM=Black
    @FinanceTechNews.com=Black
    @PBPInfo.com=Black
    @PGICARDS.com=Black
    @aandbthecofd.com=Black
    @accordfo.com=Black
    @advisedaccount.com=Black
    @askcareathome.co.uk=Black
    @bbestletter.com=Black
    @berrytorrent.com=Black
    @bigmorte.com=Black
    @bloomrers.uk.sun.com=Black
    @bnquebec.ca=Black
    @bonellryan.com=Black
    @boqs.com=Black
    @bostonmedical.com=Black
    @btinternet.com=Black
    @calbar.org=Black
    @cartwebneed.info=Black
    @choicesclub.com=Black
    @claimroot.com=Black
    @clipdaily.net=Black
    @cofs.net=Black
    @collegeboard.com=Black
    @colleges.org=Black
    @conviction.com=Black
    @csisuper.info=Black
    @dmcphone.com=Black
    @dmfcontemporary.com=Black
    @dodgerthyme.com=Black
    @electronicintifada.net=Black
    @evergladesfarmequipment.com=Black
    @fashion914.com=Black
    @fastpitchnetworking.com=Black
    @gertyunder.com=Black
    @getmeoutnowonline.com=Black
    @getoutofitinstantly.info=Black
    @golfpiler.com=Black
    @grassgrowsfast.com=Black
    @helplifeout.com=Black
    @helpmeoutonline.com=Black
    @ifc14.com=Black
    @insureinsureinsureinsure.com=Black
    @irissapphire.com=Black
    @j28880.sweetxtian.com=Black
    @janugget.com=Black
    @jogtric.com =Black
    @leadertool.info=Black
    @literaturelowest.net=Black
    @locaagency.info=Black
    @locameans.info=Black
    @locamember.info=Black
    @mail.career-degree.com=Black
    @mail.college-info.org=Black
    @mail.eggplantmorphology.com=Black
    @mail.severalunless.com=Black
    @mail.subventionluscious.com=Black
    @makecorrect.info=Black
    @mediashaperonline.com=Black
    @meridianmt.com=Black
    @metallicbeige.com=Black
    @michaelconnelly.com=Black
    @missioncorrect.info=Black
    @missionleft.info=Black
    @mossgamboge.com=Black
    @mx.crofferz.com=Black
    @mx.helpmedealz.com=Black
    @mx.lettherebdealz.com=Black
    @mx.litedealz.com=Black
    @mx11.notifypriory.com=Black
    @mx5.ripstikreviews.com=Black
    @myconfigtrue.info=Black
    @myfinepro.com=Black
    @mysql.com=Black
    @ncesingleu.com=Black
    @newcapo.com=Black
    @newcityshoes.com=Black
    @news.college.us.com=Black
    @newsletter.designlinenetwork.com=Black
    @nydailynews.com=Black
    @pacificvalentines.com=Black
    @peoplevalid.info=Black
    @pinkcrocks.net=Black
    @pnopyi.com=Black
    @predwellpreconfer.net=Black
    @premierfaucet.com=Black
    @promanpm.com=Black
    @quicklagger.com=Black
    @r22355.ncesngle.com=Black
    @reply.comblizzard.com=Black
    @reply.nativewatch.com=Black
    @reply.netmasonweb.com=Black
    @riverclove.com=Black
    @searchersrocks.org=Black
    @servoprivacy.info=Black
    @sisqtel.net=Black
    @skrenta.com=Black
    @smallparts.com=Black
    @structuredmaterials.com=Black
    @superiordrive.info=Black
    @swerthylikeness.com=Black
    @targetontime.com=Black
    @televar.com=Black
    @tiresonsale.net=Black
    @topbrandmedia.com=Black
    @v16832.swetchristian.com=Black
    @wnbc.com=Black
    @worldweighted.com=Black
    @yourcampfireonline.com=Black
whitelisthelo=list
    @btinternet.com=White
whitelisthosts=list
    @btinternet.com=White
whitelistsenders=list
    @btinternet.com=White

The address I am trying to make a whitelist entry for is the @btinternet.com. That is a yahoo server that is fairly common in England from what the gentleman tells me. But as you can see from the list above it is doing some fairly strange things. I have them white listed but the address @btinternet.com is still listed in the badmailfrom portion above. How would I go about removing it from there?

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Remove Addres from badmailfrom list
« Reply #14 on: July 10, 2008, 06:13:38 PM »
Ok,

Post to the bug report for Darrell that the entries listed at > db file:wbl key:badmailfrom do not show up in the blacklist on the server-manager panel.

I think that the badmailfrom blacklist will trump all the whitelists.

If the entries in the whitelists do not show up in the server-manager panel, you need to report that also.