• Re: debugging mailpost

    From =?UTF-8?Q?Julien_=c3=89LIE?=@21:1/5 to All on Sat Jan 22 11:57:56 2022
    Bonjour Jean-Daniel,

    /etc/news> cat test.eml | /usr/lib/news/bin/mailpost -a test@culte.org
    -b /var/tmp -t /var/tmp -d local culte.test
    inews failed: inews: warning: What server? inews: article will be spooled

    so something works. But what is the "server" mailpost asks for? inews problem?

    I keep telling you that your installation is not yet finished, but do
    not listen.
    Did you read CHECKLIST?

    https://www.eyrie.org/~eagle/software/inn/docs/checklist.html

    """
    Start with inn.conf; you must fill in [...] the NNTP server to use for
    posts (server is commonly set to localhost).
    """

    --
    Julien ÉLIE

    « Moi, je n'ai pas goûté le sel de cette plaisanterie. » (Astérix)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jdanield@21:1/5 to All on Sat Jan 22 11:46:14 2022
    Hello,

    I have yet an other problem.

    My goal is to feed a mailing list to my INN server. I used to do this
    with mailman, and mailman manage itself the setup, but now my mailing
    list is managed with sympa that don't.

    mailing list and usenet server are different machines.

    fir test purpose I created a "test@dodin.fr.nf" user in a "test" mailing
    list.

    I added in /etc/aliases the line:

    test: jdd, "| /usr/lib/news/bin/mailpost -a test@culte.org -b /var/tmp
    -t /var/tmp -d local culte.test -o /etc/news/mailpost.txt"

    jdd receive the mails... but I have no post in culte.test, neither
    mailpost.txt local file. One can subscribe to culte.test on dodin.fr.nf
    and see the messages posted *directly* on the newsgroups are ok, but no
    message from the test list.

    I tried to send manually a message to mailpost

    cat test.eml | /usr/lib/news/bin/mailpost -a test@culte.org -b /var/tmp
    -t /var/tmp -d local culte.test

    (as test.eml I just copied a former message)

    first time I got:

    /etc/news> cat test.eml | /usr/lib/news/bin/mailpost -a test@culte.org
    -b /var/tmp -t /var/tmp -d local culte.test
    inews failed: inews: warning: What server? inews: article will be spooled

    if I repeat the command, I get:

    /etc/news> cat test.eml | /usr/lib/news/bin/mailpost -a test@culte.org
    -b /var/tmp -t /var/tmp -d local culte.test
    Duplicate article <sympa.1642846923.6555.653@culte.org>.

    so something works. But what is the "server" mailpost asks for? inews
    problem?

    thanks
    jdd

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jdanield@21:1/5 to All on Sat Jan 22 13:30:55 2022
    Le 22/01/2022 à 11:57, Julien ÉLIE a écrit :

    I keep telling you that your installation is not yet finished, but do
    not listen.

    of course I do

    Did you read CHECKLIST?

    yes


    https://www.eyrie.org/~eagle/software/inn/docs/checklist.html

    """
    Start with inn.conf; you must fill in [...] the NNTP server to use for
    posts (server is commonly set to localhost).
    """

    well, it's localhost as default, why don't this works? the error is no
    more the same if I give full domain name,

    cat test.eml | /usr/lib/news/bin/mailpost -a test@culte.org -b
    /var/tmp -t /var/tmp -d local culte.test
    inews failed: inews: cannot send article to server: 441 You are not
    allowed to approve postings inews: article not posted

    this is from hand, of course still no result from the mailing list :-(

    sorry
    jdd

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From yamo'@21:1/5 to All on Sun Jan 23 12:11:33 2022
    Hi,

    jdanield a tapoté le 22/01/2022 13:30:
    well, it's localhost as default, why don't this works? the error is no
    more the same if I give full domain name,

    It may be a wrong configuration of your fqdn?

    On my server :
    $ hostname
    rasp.pasdenom.info

    But some commands (maybe inews) will by default (I don't know why) speak
    with news.pasdenom.info


    --
    Stéphane

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jdanield@21:1/5 to All on Sun Jan 23 14:50:52 2022
    Le 23/01/2022 à 12:11, yamo' a écrit :
    Hi,

    jdanield a tapoté le 22/01/2022 13:30:
    well, it's localhost as default, why don't this works? the error is no
    more the same if I give full domain name,

    It may be a wrong configuration of your fqdn?

    dunno :-(. I restored "localhost", rereading the doc it says "mostly
    used", not "default". As fdqn, I often wonder id it's the domain name
    (ie dodin.fr.nf) or including the hostname (here: ns507557)


    On my server :
    $ hostname
    rasp.pasdenom.info

    But some commands (maybe inews) will by default (I don't know why) speak
    with news.pasdenom.info


    may be some alias to add to /etc/hosts?

    thanks
    jdd

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to jdanield on Sun Jan 23 11:19:35 2022
    On 1/23/22 6:50 AM, jdanield wrote:
    As fdqn, I often wonder id it's the domain name (ie dodin.fr.nf) or
    including the hostname (here: ns507557)

    FQDN is the Fully Qualified Domain Name, meaning that it's supposed to
    be the entire name. E.g. ns507557.dodin.fr.nf from your example.

    IMHO, the output of `hostname` (without any parameters) /should/ be the
    FQDN. Some people / Distributions (Debian) say that the output of
    `hostname` should be unqualified.

    There is a reason that Bash and Zsh have different variables for the
    base name and the FQDN for use in the prompt and elsewhere. These
    variables have the same value if the hostname doesn't contain the FQDN
    and have the expected different values if the hostname does contain the
    FQDN.

    Bash:
    \h the hostname up to the first `.'
    \H the hostname

    Zsh:
    %m The hostname up to the first `.'.
    %M The full machine hostname.

    There's also the fact that every commercial Unix distribution that I've
    checked have the FQDN in the hostname.

    ProTip: use the fqdn for the hostname.



    --
    Grant. . . .
    unix || die

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jdanield@21:1/5 to All on Sun Jan 23 19:28:01 2022
    Le 23/01/2022 à 19:19, Grant Taylor a écrit :
    On 1/23/22 6:50 AM, jdanield wrote:
    As fdqn, I often wonder id it's the domain name (ie dodin.fr.nf) or
    including the hostname (here: ns507557)

    FQDN is the Fully Qualified Domain Name, meaning that it's supposed to
    be the entire name. E.g. ns507557.dodin.fr.nf from your example.

    yes, sound reasonable

    IMHO, the output of `hostname` (without any parameters) /should/ be the
    FQDN. Some people / Distributions (Debian) say that the output of
    `hostname` should be unqualified.

    my openSUSE gives only

    # hostname
    ns507557

    when /et/hosts have (now - the order of the domains names don't seems to
    be relevant:

    127.0.0.1 localhost dodin.fr.nf ns507557.dodin.fr.nf news.dodin.fr.nf

    jdd

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jdanield@21:1/5 to All on Sun Jan 23 19:36:18 2022
    Le 23/01/2022 à 14:50, jdanield a écrit :

    may be some alias to add to /etc/hosts?


    I added them but it don't seems to have made things better, but... I
    received during my test session one message with a hint:

    /usr/lib/news/bin/mailpost culte.test". Command output: Database
    directory /var/lib/news is not writable

    I was very surprised as I just did a full test with

    inncheck -a -v -f --pedantic --perm

    and applied all the patchs needed

    (as advertised in checklist) so /var/lib/news was already owned by news:news

    I had to make it chmod 777 and now it works.

    I just wonder if this is not too unsecure?

    thanks
    jdd

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_=c3=89LIE?=@21:1/5 to All on Mon Jan 24 23:33:39 2022
    Bonjour Jean-Daniel,

    I added them but it don't seems to have made things better, but... I
    received during my test session one message with a hint:

    /usr/lib/news/bin/mailpost culte.test". Command output: Database
    directory /var/lib/news is not writable

    I had to make it chmod 777 and now it works.

    I just wonder if this is not too unsecure?

    Maybe you could just setuid mailpost? (It will then run as the news
    user and have access to the database.)

    --
    Julien ÉLIE

    « Il y a deux sortes de justice : vous avez l'avocat qui connaît bien la
    loi, et l'avocat qui connaît bien le juge ! » (Coluche)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_=c3=89LIE?=@21:1/5 to All on Tue Jan 25 00:08:42 2022
    Bonjour Jean-Daniel,

    /usr/lib/news/bin/mailpost culte.test". Command output: Database
    directory /var/lib/news is not writable

    I was very surprised as I just did a full test with

    inncheck -a -v -f --pedantic --perm

    and applied all the patchs needed

    (as advertised in checklist) so /var/lib/news was already owned by
    news:news

    Incidentally, I see that you changed the "-b /var/tmp" option given in
    the man page, and also in your previous messages in this thread.

    That's why you faced these problems of write access.


    Please note that the documentation says:
    https://www.eyrie.org/~eagle/software/inn/docs/mailpost.html

    "Instead of /var/tmp, the mail spool directory can be specified, or any
    other directory where the mailpost process has write access."

    ... and here you changed the "-b /var/tmp" example to a directory where mailpost (run as the mail user here) does not have write access...

    --
    Julien ÉLIE

    « Il y a deux sortes de justice : vous avez l'avocat qui connaît bien la
    loi, et l'avocat qui connaît bien le juge ! » (Coluche)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to jdanield on Mon Jan 24 18:01:11 2022
    On 1/23/22 11:28 AM, jdanield wrote:
    my openSUSE gives only

    # hostname
    ns507557

    I would argue that's wrong and that it should give you ns507557.dodin.fr.nf.

    when /et/hosts have (now - the order of the domains names don't seems to
    be relevant:

    127.0.0.1 localhost dodin.fr.nf ns507557.dodin.fr.nf news.dodin.fr.nf

    Why do you have what appears to be a domain name, dodin.fr.nf, as a
    hostname alias?

    The format of the hosts file is:

    <IP> <canonical name> <alias>

    Where you can have any number of aliases. (I assume there's an upper
    bound, but I've never found it, nor looked for it.)



    --
    Grant. . . .
    unix || die

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jdanield@21:1/5 to All on Tue Jan 25 08:55:39 2022
    Le 25/01/2022 à 02:01, Grant Taylor a écrit :
    On 1/23/22 11:28 AM, jdanield wrote:
    my openSUSE gives only

    # hostname
    ns507557

    I would argue that's wrong and that it should give you ns507557.dodin.fr.nf.

    it's the choice of my openSUSE Leap distribution, no idea why


    when /et/hosts have (now - the order of the domains names don't seems to
    be relevant:

    127.0.0.1 localhost dodin.fr.nf ns507557.dodin.fr.nf news.dodin.fr.nf

    Why do you have what appears to be a domain name, dodin.fr.nf, as a
    hostname alias?

    to try fixing the wrong hostname

    :-(
    thanks
    jdd

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jdanield@21:1/5 to that on Tue Jan 25 09:19:45 2022
    Le 25/01/2022 à 00:08, Julien ÉLIE a écrit :

    Incidentally, I see that you changed the "-b /var/tmp" option given in
    the man page, and also in your previous messages in this thread.

    I tested dozen of variations :-(. I got the idea it was the default.
    seems not :-(. man page also says: "Two paths are tried by default:
    pathtmp as set in inn.conf, and then /var/tmp if pathtmp is not
    writable." I wrongly supposed it was the same for db.

    that said if the db have to be persistent, /var/tmp may be an unsecure place

    ... and here you changed the "-b /var/tmp" example to a directory where mailpost (run as the mail user here) does not have write access...


    thanks. What I missed completely is "run as the mail user here". This
    allowed me also to find mailpost logs in mails logs

    that said, my mail<->news system still don't works and I'm asked
    elsewhere :-(

    thanks
    jdd

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to jdanield on Tue Jan 25 12:33:17 2022
    On 1/25/22 12:55 AM, jdanield wrote:
    it's the choice of my openSUSE Leap distribution, no idea why

    Nothing dictates that you can't go against your distribution's choice.

    I change the hostname on every single Debian / Ubuntu system that I
    administer to be the FQDN.

    to try fixing the wrong hostname

    Adding the domain name the way you have will only ever be referenced if
    you use it as a hostname. I doubt that you ever will.

    I'd suggest fixing -- what I consider to be -- the underlying hostname
    problem. Many different things will fail in weird ways with incorrect hostnames. Fix the foundation and you fix, or at least simplify, a lot
    of other problems.



    --
    Grant. . . .
    unix || die

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)