# netqmail-1.06 does not compile with openSSL 1.1 [Solved]

## zhangyida

I'm trying to install mail-mta/netqmail-1.06-r5 and got some error text like the following:

```
qmail-remote.c:273:24: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’ 
```

I googled the error and found out that it is because of qmail is not compiling with openSSL 1.1. To make that work, a patch released in 2019.03.22 is needed. But I looked into the ebuild file of the netqmail-1.06-r5.ebuild and could not find that patch. I also tried to download that patch and apply that into the failed compiling "work" directory but the patch tried to create some already existing files and could not find destination file to patch, and plus, gives chunk failures. This makes me think that I'm not having the right version source code, or not having the right version of the patch.

I also tried to install a lower and more stable version, mail-mta/netqmail-1.06-r4, the problem gets worse, it does not only show error in qmail-remote.c file, it also shows ssl_timeoutio.c has some more errors, which is also related to openSSL.

I'm trying to install it with usage flag "qmail-spp ssl". My mail server will need to relay outgoing email to another mail server, and that server requires login name and password. That's the reason why I need the qmail-spp use flag, since it will install the spp plugin of qmail. 

I also tried to install netqmail without "qmail-spp" use flag and it fails with the same problem. I did not try to install netqmail without "ssl" use flag, as I need to use SSL for my qmail smtpd.

Anyone could direct me a way to solve this problem?Last edited by zhangyida on Wed May 15, 2019 6:43 pm; edited 2 times in total

----------

## mike155

There's already a bug in the Gentoo bug database: https://bugs.gentoo.org/675060. 

You could try the patches that are attached to the bug.

Please note that the package is currently unmaintained:

 *https://bugs.gentoo.org/675060 wrote:*   

> Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it 

 

----------

## NeddySeagoon

zhangyida,

I get the same results as your opening post in the topic.

Its a bigger problem for me as I like to use mail-client/balsa and qmail,

As of mail-client/balsa-2.5.6-r1, balsa will not authenticate against qmail, when that's fixed it downloads all the mail on the server every time, not just new mail, so its not possible to keep read mail on the server.

Fixing qmail is, for me, only a part of the problem.

----------

## zhangyida

 *mike155 wrote:*   

> There's already a bug in the Gentoo bug database: https://bugs.gentoo.org/675060. 
> 
> You could try the patches that are attached to the bug.
> 
> Please note that the package is currently unmaintained:
> ...

 

Thank you for directing me to the bug database. I read the posts there, but it looks like it does not work.

The post says that I need to apply netqmail-1.05-tls-smtpauth-20190114.patch first, and then apply netqmail-1.06-openssl-1.1.patch. But the problem was that the first patch could not be applied. It complains a lot of times saying could not find file to patch, or chunk failed. It also warns me that new file defined in the patch already exists, and ask me if it should replace them or not.

I peeked into the file netqmail-1.05-tls-smtpauth-20190114.patch, it contains a lot of path name as "netqmail-1.05-orig/netqmail-1.05", which is not right for version 1.06.

I'm now completely stuck. Any idea?

----------

## mike155

Why do you use OpenSSL 1.1? As far as I can see, the latest stable version is 1.0.2r. Can you stay with OpenSSL 1.0.2r a little longer?

Do you have a specific need for OpenSSL 1.1? Or do you use it, because you switched your whole system to unstable?

----------

## zhangyida

 *mike155 wrote:*   

> Why do you use OpenSSL 1.1? As far as I can see, the latest stable version is 1.0.2r. Can you stay with OpenSSL 1.0.2r a little longer?
> 
> Do you have a specific need for OpenSSL 1.1? Or do you use it, because you switched your whole system to unstable?

 

Well, it's a long story. I've recently updated the system and openSSL 1.1 was there, so I just upgraded to it, without thinking too much. The upgrade took me a lot of time to figure out, so I don't want to downgrade to 1.0.2r.

I thought it over about what I read in the bug database and I think I need to replace the netqmail-1.05-tls-smtpauth-20070417.patch with netqmail-1.05-tls-smtpauth-20190114.patch in the netqmail-1.06-r5.ebuild file and Manifest file, so that the new patch will be used when emerging. I'm also wondering if the openssl-1.1 patch should be added into the ebuild file and Manifest file, as well. In that way, I think this will be completely fixed.

I'll try this and let you guys know.

----------

## zhangyida

OK. Problem solved. I modified the /usr/portage/mail-mta/netqmail/Manifest file and /usr/portage/mail-mta/netqmail/netqmail-1.06-r5.ebuild to include the netqmail-1.05-tls-smtpauth-20190114.patch instead of that 20070417 patch, and ignored the openssl1.1 patch. Everything worked as amazing.

If anyone needs the modified files, Please let me know how to do the attachment to a post in this forum, I'll attach it to this post. Thanks everyone, for your discussing with me about my problem.

----------

## asturm

You're not supposed to work in /usr/portage/ at all. You should create your own local overlay for that.

----------

## Anon-E-moose

 *asturm wrote:*   

> You're not supposed to work in /usr/portage/ at all. You should create your own local overlay for that.

 

The reason is the next time you do emerge --sync, you lose all the changes including the patch. (Message for zhangyida, I know you know this, asturm)

----------

## zhangyida

 *Anon-E-moose wrote:*   

>  *asturm wrote:*   You're not supposed to work in /usr/portage/ at all. You should create your own local overlay for that. 
> 
> The reason is the next time you do emerge --sync, you lose all the changes including the patch. (Message for zhangyida, I know you know this, asturm)

 

Yeah, I know that. Well, to create my own overlay, I'll need to read another bunch of documents again and maybe follow some guide or handbook and make some errors and learn from that. Well, I don't want go that direction yet. For now, I've just copied the modified Manifest and Ebuild file to my own home folder and when I need them, I'll copy them back.

Thank you everybody for your suggestions. I've learnt a lot from you guys. I'll mark this as solved.

----------

## NeddySeagoon

zhangyida,

Please post to the bug. That way your work may get taken up into the ::gentoo repo.

-- edit --

Fixed by https://github.com/gentoo/gentoo/commit/4c122053486c7587f5f93333e4f52619d2828407#diff-d60f88ad9c980a975c6d8c787d783032

It should be in portage in a few hours.

----------

## zhangyida

 *NeddySeagoon wrote:*   

> zhangyida,
> 
> Please post to the bug. That way your work may get taken up into the ::gentoo repo.
> 
> -- edit --
> ...

 

OK. I've posted my modified Manifest file and ebuild file in the bug. Thank you for letting me know that. Hope more people could benefit from my work, that will be my honor.

----------

